How to put reload option in ui-sref markup

前端 未结 1 1650
半阙折子戏
半阙折子戏 2020-12-06 04:19

How can I specify the reload option in a ui-sref markup? All the examples I see use the javascript function directly.



        
相关标签:
1条回答
  • 2020-12-06 04:58

    Use ui-sref-opts. Here you go:

    <a ui-sref="app.editPost({new:true})"
       ui-sref-opts="{reload: true, notify: true}">new post</a>
    

    https://ui-router.github.io/ng1/docs/0.3.1/index.html#/api/ui.router.state.directive:ui-sref

    0 讨论(0)
提交回复
热议问题