我开始使用简单的Angular 2应用程序.但是当我添加lodash的导入并尝试使用它时,我得到错误并且应用程序停止工作,并且无法弄清楚问题是什么.
我在控制台中收到这两个错误:
未捕获的SyntaxError:意外的令牌<__ exec @system.src.js:1374entry.execute @system.src.js:3300linkDynamicModule @system.src.js:2921link @system.src.js:2764execute @system.src.js:3096doDynamicExecute @ system.src.js:715link @system.src.js:908doLink @system.src.js:569updateLinkSetOnLoad @system.src.js:617(匿名函数)@system.src.js:430run @ angular2-polyfills.js: 138zoneBoundFn @ angular2-polyfills.js:111lib $ es6 $ promise $$ internal $$ tryCatch @ angular2-polyfills.js:1511lib $ es6 $ promise $$ internal $$ invokeCallback @ angular2-polyfills.js:1523lib $ es6 $ promise $ $ internal $$ publish @ angular2-polyfills.js:1494(匿名函数)@ angular2-polyfills.js:243run @ angular2-polyfills.js:138zoneBoundFn @ angular2-polyfills.js:111lib $ es6 $ promise $ asap $$ flush @ angular2-polyfills.js:1305 angular2-polyfills.js:138
未捕获的SyntaxError:意外的令牌<评估http:// localhost:3000/lodash 加载http:// localhost:3000/app/app.jsrun @ angular2-polyfills.js时出错:138zoneBoundFn @ angular2-polyfills.js:111lib $ es6 $ …