nested view doesn't work using angularjs

随声附和 提交于 2019-12-25 09:15:02

问题


I'm using ui-router, but one strange thing happens, the style which i put in 'parent' doesn't get loaded.

Here's how my folder and files look like

my route.js look like this

.state("home", {
                url: "/",
                templateUrl: "index.html"
            })

            .state("dashboard", {
                url: "/dashboard",
                views:{
                    templateUrl: "layout.html"
                }
            })

            .state("dashboard.index", {
                views:{
                    templateUrl: "dashboard/index.html"
                }
            })

I expect layout.html can be the wrap of every module, like I have dashboard module, and module can have many sub-modules but still use the style which located in layout.html.

I've stuck for 6 hours, I need help, I posted my repo here.

来源:https://stackoverflow.com/questions/39303777/nested-view-doesnt-work-using-angularjs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!