場景:視圖層級以下git
view1github
--view11dom
--view111mvvm
需求:view11的一個動做事後,單獨刷新view12ide
解決方式:修改層級設計ui
view1this
--view11設計
--view111code
結論:ui router不支持同級別views單獨刷新, ui router 原則是經過state控制視圖,不要直接控制viewsrouter
這個設計和只能更新mvvm scope的變量,儘可能不要操做dom元素同樣,我的認爲是很2..........
個人場景view11並行的有不少view13 view14 view15 view16,每一個都有操做刷新view12,
按state更新的話,路由要從新嵌套,每一個下面都要嵌套view111,麻煩的很。。。
The answer is - hierarchy should be built from states, not via views.
You should really study the doc (which is pretty clear, short and easy to read)
And then maybe follow this:
to see, that we can
resolves
) - without reloading its parentSo, the answer should be
split your hierarchy into state hierarchy, not view. Navigate to and among children to change the child views... while profit from parent stable views
Check the plunker here