This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Small ng-admin config showing how to inject a Login controller when | |
a 401 error is returned by the server. | |
*/ | |
(function () { | |
"use strict"; | |
var app = angular.module('myApp', [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('admin', ['ng-admin']), | |
hook = new Hook.Client({...}); | |
var headerNav, pageWrapper, restangular; | |
if (hook.auth.currentUser && hook.auth.currentUser.role != 'admin') { | |
hook.auth.logout(); | |
} | |
function hideMenu() { |