Nesting ng-views in angular js

前端 未结 6 569
失恋的感觉
失恋的感觉 2020-12-02 12:14

I had two different apps in angular. During integration to a single application I had to

nest ng-views.

For sample (index.html) is



        
6条回答
  •  無奈伤痛
    2020-12-02 12:56

    I'd suggest that you have a look at the ui-router project by the AngularUI team. This project contains a new router based on states, which can also react to URLs, but allow way better handling of application state.

    This includes the use of having multiple and / or nested views.

    I had a similar question a while ago, so maybe its answers are going to help you as well: How do I setup nested views in AngularJS?

    Moreover, you can expect ui-router to be integrated in AngularJS in a future version, so this will most probably be the way routing works in the future anyway. So no need to stick to other workarounds if you can already have what will be next today :-)

提交回复
热议问题