【发布时间】:2017-09-18 15:21:19
【问题描述】:
您好,我使用 Angular 制作了应用程序,我使用 ui-router 进行路由,我使用 gulp-uglify 缩小了整个 Angular 应用程序。
缩小应用程序后,我的ui-router的子路由(嵌套路由)没有渲染视图,主要的父路由工作正常。
有人可以建议我在这里做什么是我的路线示例:
.state('masterPage', {
url: "",
abstract: true,
templateUrl: 'src/app/Client/common/fullPage.html'
}).state('masterPage.userProfile.dashboard', {
url: "/dashboard",
templateUrl: "src/app/Client/userProfile/dashboard/index.html",
controller: "userDashboard",
controllerAs: 'vm'
})
【问题讨论】:
-
您检查控制台是否有错误?
-
请显示控制器userDashboard的定义。这通常是因为注入的依赖项在 min 进程中被破坏了。在此处查看隐式注释下的警告:docs.angularjs.org/guide/di
-
控制台没有错误
标签: javascript angularjs angular-ui-router