I am trying to write a ionic app based on the sidemenu basis. One view that I am creating is a login view on which the sidemenu should be deactivated. Therefore I need the dependency variable $ionicView.
This leads to the error
Unknown provider: $ionicViewProvider <- $ionicView <- LoginController
The same error appears when trying to access $ionicConfigProvider.
Login.module.js:
angular.module("Login", ['ionic']); Login.Controller.js:
angular.module("Login") .controller("LoginController", function($ionicSideMenuDelegate, $ionicView){ var thisRef = this; thisRef.Username = ""; thisRef.Password = ""; $ionicView.beforeEnter(function() { $ionicSideMenuDelegate.canDragContent(false); }); $ionicView.beforeLeave(function(){ $ionicSideMenuDelegate.canDragContent(true); }); });