12345678910111213141516171819202122232425 |
- 'use strict';
- * @ngdoc function
- * @name domainManagerApp.controller:MainCtrl
- * @description
- * # MainCtrl
- * Controller of the domainManagerApp
- */
- angular.module('domainManagerApp.header', ['domainManagerApp.userData'])
- .controller('HeaderController', ['$scope', '$rootScope', '$location', 'UserData', function ($scope, $rootScope, $location, UserData) {
- $scope.isActive = function (viewLocation) {
- return viewLocation === $location.path();
- };
- $scope.isAuthenticated = UserData.isAuthenticated();
- console.log($scope.isAuthenticated)
- $rootScope.$on('user:isAuthenticated', function(data, isAuthenticated) {
-
- $scope.isAuthenticated = isAuthenticated;
- console.log($scope.isAuthenticated)
- });
- }]);
|