Javascript 如何限制用户直接从AngularJS(1.x)中的URL访问html模板
努力让用户限制直接在AngularJS(1.x)中访问HTML页面 我的应用程序URL是:https://mylocalhost/ 页面需要限制才能访问URL:https://mylocalhost/common/security/login.html 正在尝试使用app.js中的“stateChangeStart”Javascript 如何限制用户直接从AngularJS(1.x)中的URL访问html模板,javascript,angularjs,Javascript,Angularjs,努力让用户限制直接在AngularJS(1.x)中访问HTML页面 我的应用程序URL是:https://mylocalhost/ 页面需要限制才能访问URL:https://mylocalhost/common/security/login.html 正在尝试使用app.js中的“stateChangeStart” $rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState
$rootScope.$on("$stateChangeStart", function(event, toState, toParams, fromState, fromParams){
//restric condition here
});
由于此html页面直接从url加载,因此此页面不受appModule/loginController的控制。浏览器网络面板仅显示加载的Html页面
任何限制此页面直接访问的建议/建议。有帮助吗?