Angular2: ¿Es lento?
Solo eché un vistazo a la última versión angular que lanzó el equipo angular. Angular2 ha salido y han lanzado una nueva página web.http://angular.io.
Allí tienen un proyecto de inicio rápido de 5 minutos que muestra rápidamente la nueva sintaxis y lo que debe usar para realizar una nueva aplicación angular.
Acabo de hacer todos los pasos para que funcione, pero tardó 4.93 segundos en cargarse.
Me pregunto, ¿es angular 2 tan lento? O tal vez extraño algunos pasos.
Aqui esta mi codigo
// 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);
e 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>