I have index.html as Master Page and indexController.js. index.html has a partial body
<div ng-view=""></div>
to load partial view, for example, login.html
The pure AngularJS project use semantic-ui. login.html has form login with implementing FormValidation of semantic-ui.
$(document).ready(function () {
$('.ui.form')
.form({
// some setting....
onSuccess: function (event, fields) {
var scope = angular.element($('#loginForm')).scope();
scope.$apply(function () {
scope.login();
});
return false;
}
})
});
In index.html, I have logic to hide or show menu
<a class="ui item" ng-hide="!authentication.isAuth" href="#/assets">Asset</a>
and indexController.js
$scope.authentication = authService.authentication;
How can I update information of indexController to show or hide menu on it?