12345678910111213141516171819202122232425262728293031 |
- app.directive('navMenu',['$interval',function($interval){
- return {
- restrict: 'E',
- scope: {
- toggleMenu: '&',
- isActive: '&'
- },
- templateUrl: 'app/views/nav-menu.html',
- controller: function($scope,$location){
- $scope.isActive = function(linkPath){
- if(linkPath == $location.path()){
- return true;
- } else{
- return false;
- }
- }
- $interval(function(){
- if(firebase.auth().currentUser){
- if(firebase.auth().currentUser.uid == 'uRkqD9GmNxUsdgF1XtmPicDJwAz1'){
- $scope.isModeratorSigned = true;
- } else{
- $scope.isModeratorSigned = false;
- }
- } else{
- $scope.isModeratorSigned = false;
- }
- },1000)
- }
- }
- }])
|