Angular ui-router: ui-views vs directives?

后端 未结 4 1046
陌清茗
陌清茗 2020-12-12 14:35

The angular ui-router allows multiple nested views. The role of these interchangeable views seems to overlap the role of directives.

What are the pros/cons

4条回答
  •  [愿得一人]
    2020-12-12 15:05

    It seems you can do something like this with relative impunity:

        $stateProvider.state('general', {
            url: '/general',
            views: {
                main: {
                    template: ''
                }
            }
        });
    

提交回复
热议问题