我有一个非常奇怪的问题。下面的代码工作正常。但是,如果我将 Angular 脚本更改为我的本地脚本。突然间,当
System.import('components/app/app')
运行时,它会在 jspm.io 上搜索脚本,而不是我的本地. 为什么是这样?
<!doctype html>
<html>
<head>
<script src="https://github.jspm.io/jmcriffey/bower-traceur-runtime@@0.0.87/traceur-runtime.js"></script>
<script src="https://jspm.io/system@@0.16.js"></script>
<script src="https://code.angularjs.org/2.0.0-alpha.22/angular2.dev.js"></script>
<script>
System.traceurOptions = {
annotations: true,
memberVariables: true,
typeAssertions: false,
types: true
};
System.config({
baseURL: '/'
});
</script>
<script src="/javascripts/libs/zone.js"></script>
<script src="/javascripts/libs/long-stack-trace-zone.js"></script>
</head>
<body>
@html.block('primary', function(model){
<app></app>
})
<script>
System.import('components/app/app').then(function(module) {
// uncomment for debugging.
// zone = zone.fork(Zone.longStackTraceZone);
//return module.main();
});
</script>
</body>
</html>