-
Notifications
You must be signed in to change notification settings - Fork 0
/
content.json
1 lines (1 loc) · 2.89 KB
/
content.json
1
{"meta":{"title":"Jiande's博客","subtitle":"说到!做到?努力肯定","description":"描述","author":"Jiande","url":"http://yoursite.com"},"pages":[],"posts":[{"title":"angular开发问题汇总","slug":"angular开发问题汇总","date":"2018-04-27T17:36:16.000Z","updated":"2018-11-15T06:45:44.521Z","comments":true,"path":"2018/04/27/angular开发问题汇总/","link":"","permalink":"http://yoursite.com/2018/04/27/angular开发问题汇总/","excerpt":"","text":"在开发angular中遇到的一些问题及解决方案. 将会持续更新 1. 在cli运行的情况下, 添加懒加载模块可能报错:12345678910core.js:1448 ERROR Error: Uncaught (in promise): TypeError: undefined is not a functionTypeError: undefined is not a function at Array.map (<anonymous>) at webpackAsyncContext (eval at ./src/$$_lazy_route_resource lazy recursive (main.bundle.js:13), <anonymous>:19:34) at SystemJsNgModuleLoader.loadAndCompile (core.js:6558) at SystemJsNgModuleLoader.load (core.js:6542) at RouterConfigLoader.loadModuleFactory (router.js:4543) at RouterConfigLoader.load (router.js:4523) at MergeMapSubscriber.eval [as project] (router.js:2015) at MergeMapSubscriber._tryNext (mergeMap.js:128) 1.1 解决方案重新运行项目`npm start` 2. 通过第三方插件或方法异步改变组件变量的值时出现变量没有更新到模板2.1 问题根源angular的检测机制是基于zone, 而第三方的异步调用运行在zone作用之外, 不会触发zone检测, 导致变量没有及时更新到模板 2.2 解决方法1. 通过`ChangeDetectorRef.detectChanges()`手动进行变量检测; 2. 通过`ngZone.run(() => {})`来将方法放在zone中进行.","categories":[{"name":"前端","slug":"前端","permalink":"http://yoursite.com/categories/前端/"}],"tags":[{"name":"angular","slug":"angular","permalink":"http://yoursite.com/tags/angular/"}],"keywords":[{"name":"前端","slug":"前端","permalink":"http://yoursite.com/categories/前端/"}]},{"title":"Hello World(Travis CI)","slug":"hello-world","date":"2018-03-18T00:00:00.000Z","updated":"2018-11-15T06:45:44.521Z","comments":true,"path":"2018/03/18/hello-world/","link":"","permalink":"http://yoursite.com/2018/03/18/hello-world/","excerpt":"","text":"Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new \"My New Post\" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment","categories":[{"name":"blog","slug":"blog","permalink":"http://yoursite.com/categories/blog/"}],"tags":[{"name":"hexo","slug":"hexo","permalink":"http://yoursite.com/tags/hexo/"}],"keywords":[{"name":"blog","slug":"blog","permalink":"http://yoursite.com/categories/blog/"}]}]}