I am trying to update the $scope
object from controller, But it's not updating. but in console i am getting updated status.
here is my code :
var galleryMenu = ['$route', function ($route) {
return {
scope : true,
replace : true,
template : function () {
var page = $route.current.className || 'home';
return galleryMenuItem(page);
},
controller : function ($scope, $element) {
$scope.galleryProject = function () {
$scope.galleryShow = !$scope.galleryShow;
console.log($scope.galleryShow) //gives me true, but `DOM` not updating.
}
}
}
}];