2016-04-26 87 views
0

我想在使用WebView的Android混合应用程序中加载Angular2应用程序。 SDK版本为21.无法在Android WebView API中运行Angular2应用程序21

我无法加载应用程序。它无法加载boot.js模块。

 Errormessage: "undefined is not a function↵ 
Error loading http://example.com/mobile/boot.js"stack: 

"TypeError: undefined is not a function↵  
    at http://example.com/mobile/node_modules/angular2/bundles/angular2.dev.js:764:10↵  
    at http://example.com/mobile/node_modules/angular2/bundles/angular2.dev.js:779:5↵  
    at linkDynamicModule (http://example.com/mobile/node_modules/systemjs/dist/system.src.js:2921:32)↵  
    at getModule (http://example.com/mobile/node_modules/systemjs/dist/system.src.js:2889:9)↵  
    at http://example.com/mobile/node_modules/systemjs/dist/system.src.js:2925:16↵  
    at http://example.com/mobile/node_modules/angular2/bundles/angular2.dev.js:11425:22↵  
    at linkDynamicModule (http://example.com/mobile/node_modules/systemjs/dist/system.src.js:2921:32)↵  
    at getModule (http://example.com/mobile/node_modules/systemjs/dist/system.src.js:2889:9)↵  
    at http://example.com/mobile/node_modules/systemjs/dist/system.src.js:2925:16↵  
    at http://example.com/mobile/node_modules/angular2/bundles/angular2.dev.js:13555:20" 

这似乎是SystemJS与我正在使用的WebView的兼容性问题。有没有人遇到同样的问题?

回答

1

添加SystemJS polyfills为我做了诀窍。

相关问题