angularjs – ng-view不能在Microsoft Edge上运行
发布时间:2020-12-17 09:15:46 所属栏目:安全 来源:网络整理
导读:我正在Microsoft Edge测试我的应用程序,它会抛出以下错误: app.config( function ($routeProvider) { $routeProvider. when('/logout',{ template: 'logout-page/logout-page' }) .when('/',{ template: 'application-manage/application-manage' })}); 在
我正在Microsoft Edge测试我的应用程序,它会抛出以下错误:
app.config( function ($routeProvider) { $routeProvider. when('/logout',{ template: '<logout-page></logout-page>' }) .when('/',{ template: '<application-manage></application-manage>' }) }); 在我的索引中: <body style="height: 100%"> <div class='main-div' style="height: 100%;" ng-view ng-class="slide">Loading....</div> </body> 第一种情况:’< application-manage>< / application-manage>‘它正常工作但是当我点击注销.它抛出错误: SyntaxError <div class="main-div ng-scope" style="height: 100%" ng-class="slide" ng-view=""> 感谢大家.问题解决了,这是因为我使用基本的身份验证方式: jQuery.ajax({ type: "GET",url: logoutURL,async: true,username: fakeUser,password: fakePassword,headers: {"Authorization": "Basic Authorization"} }).done(function () { console.log("Can not logout Basic Authentication in this browser"); defer.resolve(true); }).fail(function () { console.log("You have successfully logged out!"); defer.resolve(true); }); 来自:https://stackoverflow.com/questions/233507/how-to-log-out-user-from-web-site-using-basic-authentication Try: app.config( function ($routeProvider) { $stateProvider .state('/logout',{ url:'/logout',template: '<ui-view>' }) .state('/',{ url:'/',template: '<ui-view>' }) }); You can Also use external html file,in this case use **templateUrl:'your file.html'** (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- angular – 如果变量值未定义/ null,如何隐藏HTML模板?
- angularjs 多选下拉框 控件angularjs ui-select2
- scala – org.apache.spark.ml.classification和org.apache
- angularjs – 多指令[ngController,…]要求新/隔离范围
- Scala:两种方法,不同的参数类型但相同的代码:如何统一?
- PowerShell操作WMI概览
- WebService 接口调用指南
- angularjs – 即使图像出现,为什么我的ng-src会出现404错误
- angular – Observable.forkJoin和数组参数
- AngularJs中$http发送post或者get请求,SpringMVC后台接收不