在angularjs中从子状态视图中隐藏父状态视图,最佳实践? [英] Hiding parent state view from child state view in angularjs, best practices?

查看:25
本文介绍了在angularjs中从子状态视图中隐藏父状态视图,最佳实践?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

update-approved-product-campaign-ad"这是product-campaigns.product-campaign-detail"的子状态,当我通过 ui-sref 调用子状态时,父状态视图与子状态视图一起被调用我不想要.我只想要子状态视图.

'update-approved-product-campaign-ad' this is the child state of 'product-campaigns.product-campaign-detail' when i call child state through ui-sref parent state view gets called along with child state view which i don't want. I want only child state view.

推荐答案

我通过用 <div ui-view="">

这将在导航到子状态时用子覆盖 ui-view,否则它将包含专利状态的视图.

This will override the ui-view with the child when navigating to a child state, otherwise it will contain the patent state's view.

这篇关于在angularjs中从子状态视图中隐藏父状态视图,最佳实践?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆