AngularJS: Multiple views with routing without losing scope

前端 未结 4 945
陌清茗
陌清茗 2021-02-04 11:07

I\'m trying to implement a classic list/details UI. When clicking an item in the list, I want to display an edit form for that item while still displaying the list. I\'

4条回答
  •  情歌与酒
    2021-02-04 11:21

    I've found Angular Multi View to be a godsend for this scenario. It lets you preserve scope as the route changes and lets multiple controllers share the same route without nesting your views.

    I recommend Angular Multi View if you have more than 2 views on your page. Otherwise, when using ui-router, nesting multiple views gets messy really fast.

提交回复
热议问题