场景:视图层级如下

  view1

     --view11

     --view111

需求:view11的一个动作过后,单独刷新view12

解决方式:修改层级设计

  view1

     --view11

         --view111

结论:ui router不支持同级别views单独刷新, ui router 原则是通过state控制视图,不要直接控制views

这个设计和只能更新mvvm scope的变量,尽量不要操作dom元素一样,个人认为是很2..........

我的场景view11并行的有很多view13 view14 view15 view16,每个都有操作刷新view12,

按state更新的话,路由要重新嵌套,每个下面都要嵌套view111,麻烦的很。。。

https://stackoverflow.com/questions/37300612/how-to-reload-a-single-named-view-with-angular-ui-router

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:

Nested states or views for layout with leftbar in ui-router?

to see, that we can

  • reload any child state (and trigger its resolves) - without reloading its parent
  • be sure that all views inside of reloaded states are reloaded (each view controller is re-init)

So, 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

最新文章

  1. 关于去除Eclipse对JavaScript的验证
  2. Asynchronous javascript and xml
  3. 生物信息大数据&数据库(NCBI、EBI、UCSC、TCGA)
  4. vsphere vcenter server下安装ubuntu的vmwaretools
  5. 需求分析(NABC)
  6. windows bat 文件
  7. 分享:Perl打开与读取文件的方法
  8. cmd find命令
  9. IT行业智力测试
  10. ExtJs005继承
  11. Delphi版IP地址与整型互转
  12. [编织消息框架][JAVA核心技术]动态代理应用12-总结
  13. python并发编程之多进程
  14. ubuntu14.04使用root用户登录桌面
  15. python序列(列表,元组,字典)的常用排序
  16. Ehcache配置参数示例
  17. python3.4学习笔记(二十四) Python pycharm window安装redis MySQL-python相关方法
  18. 在ubuntu下随意编译安装需要的python版本
  19. EUI List列表实现人物列表 (List的Item复用,Item获取)
  20. linux内核分析第七周-Linux内核如何装载和启动一个可执行程序

热门文章

  1. selenium自动化测试、Python单元测试unittest框架以及测试报告和日志输出
  2. Vue2.0学习--Vue数据通信详解
  3. c++语言的学习笔记代码与笔记注释《函数部分》
  4. GIT版本控制系统(二)
  5. phaser小游戏框架学习(二)
  6. jmeter+Jenkins性能测试自动化搭建
  7. the swap trick用于锐减过剩容量
  8. 14.Diameter of Binary Tree(二叉树的直径)
  9. Problem Arrangement ZOJ - 3777(状压dp + 期望)
  10. 百度地图 api bug 解决.......