spa-routers icon indicating copy to clipboard operation
spa-routers copied to clipboard

点击链接加载

Open ALongLi opened this issue 8 years ago • 1 comments

点击链接加载的内容是写在js里的,不是html文件,怎么以html文件实现

ALongLi avatar Feb 08 '17 11:02 ALongLi

@ALongLi
思路即: 读取文件内容作为组件,在合适时机注入到页面中 可行之一的方法: ajax读取对应.html文件内容,将返回内容赋值给 self.routers[transition.path].fn 即可(注意ajax的加载时机)

screetBloom avatar Mar 03 '18 10:03 screetBloom