Ale*_*ada 16 javascript google-chrome angular
刚刚看一下角度团队推出的最后一个角度版本.Angular2已经出局,他们已经发布了他们的新网页http://angular.io.
在那里,他们有一个5分钟的快速入门项目,可以快速显示新语法以及您必须使用什么来执行新的角度应用程序.
我刚刚完成了所有步骤以使其正常工作,但加载时间为4.93秒.
我只是想知道,角2是慢吗?或者我可能会错过一些步骤.
这是我的代码
// app.es6
import {Component, Template, bootstrap} from 'angular2/angular2';
// Annotation section
@Component({
selector: 'my-app'
})
@Template({
inline: '<h1>Hello {{ name }}</h1>'
})
// Component controller
class MyAppComponent {
constructor() {
this.name = 'Alex!';
}
}
bootstrap(MyAppComponent);
Run Code Online (Sandbox Code Playgroud)
和index.html
<!-- index.html -->
<html>
<head>
<title>Angular 2 Quickstart</title>
<script src="dist/es6-shim.js"></script>
</head>
<body>
<!-- The app component created in app.js -->
<my-app></my-app>
<script>
// Rewrite the paths to load the files
System.paths = {
'angular2/*':'angular2/*.js', // Angular
'rtts_assert/*': 'rtts_assert/*.js', //Runtime assertions
'app': 'app.js' // The my-app component
};
// Kick off the application
System.import('app');
</script>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
Mis*_*ery 30
有关如何快速运行的信息,请参阅https://github.com/djsmith42/angular2_calendar.