Javascript 角度2:TestApp不在LightTable中工作。错误:UncodedModuleInstantiator.GetUncodedModule
我想和安格拉尔一起踢球——一个非常简单的开始!我只是将angular.io中的一些代码复制到我的文件中。在LightTable(集成浏览器)中,此代码不起作用:Javascript 角度2:TestApp不在LightTable中工作。错误:UncodedModuleInstantiator.GetUncodedModule,javascript,lighttable,angular,Javascript,Lighttable,Angular,我想和安格拉尔一起踢球——一个非常简单的开始!我只是将angular.io中的一些代码复制到我的文件中。在LightTable(集成浏览器)中,此代码不起作用: <!DOCTYPE html> <html> <head> <title>Angular2 TestApp</title> <script type="text/javascript" src="./libs/angular2.sfx.dev.js"&
<!DOCTYPE html>
<html>
<head>
<title>Angular2 TestApp</title>
<script type="text/javascript" src="./libs/angular2.sfx.dev.js"></script>
<script type="text/javascript" src="./src/main.js"></script>
</head>
<body>
<my-app></my-app>
</body>
</html>
但是在当前的Firefox中,它工作正常。我做错了什么?非常感谢!这个特殊的案例是/是LightTable中的一个问题,应该用0.8.x修复。更多信息和示例项目
function AppComponent() {}
AppComponent.annotations = [
new angular.ComponentAnnotation({
selector: 'my-app'
}),
new angular.ViewAnnotation({
template: '<h1>My first Angular 2 App</h1>'
})
];
document.addEventListener('DOMContentLoaded', function() {
document.body.innerHTML += 'Hi'; //for checking, whether the file is recognized
angular.bootstrap(AppComponent);
});
Uncaught Error: ModuleEvaluationError: undefined is not a function in traceur-runtime@0.0.88/src/runtime/async.js
angular2.sfx.dev.js [2331] UncoatedModuleInstantiator.getUncoatedModule
angular2.sfx.dev.js [2413] ModuleStore.get
angular2.sfx.dev.js [3187] anonymous
Uncaught ReferenceError: angular is not defined
main.js [5] anonymous