Prevent calling parent when nested ui-sref

后端 未结 6 943

Let say I have nested DOMs and each has ui-sref for different angular-ui-router state. I want to click outer to only alert outer and c

6条回答
  •  南旧
    南旧 (楼主)
    2021-02-18 22:37

    Should I implement some kind of stopImmediatePropagation for the inner DOM so it won't trigger the parent DOM's ui-sref?

    Yes, exactly.

    Alternately, you might be able to rearrange your HTML so that the don't have a parent/child relationship.

提交回复
热议问题