Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何限制用户直接从AngularJS(1.x)中的URL访问html模板_Javascript_Angularjs - Fatal编程技术网

Javascript 如何限制用户直接从AngularJS(1.x)中的URL访问html模板

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

努力让用户限制直接在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, fromParams){
        //restric condition here
});
由于此html页面直接从url加载,因此此页面不受appModule/loginController的控制。浏览器网络面板仅显示加载的Html页面

任何限制此页面直接访问的建议/建议。

有帮助吗?