I have tried the following, but am still getting a flicker when using ng-show: Angularjs - ng-cloak/ng-show elements blink
I am using a template to load my top nav as follows:
<div data-ng-controller="userInfoCtrl">
<a href="#!home">Home</a>
<a href="#!add-item">Add Item</a>
<a href="#!settings" data-ng-show="display">Settings</a>
Here is my controller:
// User Info
appControllers.controller('userInfoCtrl', ['$scope', 'appAdminCheck', function ($scope, appAdminCheck) {
// Set value for using ng-show/ng-hide
appAdminCheck().then(function (isAdmin) {
if (isAdmin == true) {
$scope.display = true;
}
});
}]);