angularjs 2 chrome firefox -


i begin angularjs 2 helped hello2ng2 (getting started).

i've created 2 files :

index.html :

<head>     <title>angular 2 hello world!</title>     <script src="/dist/es6-shim.js"></script> </head>  <body>      <my-app></my-app>     <script>     // rewrite paths load files     system.paths = {         'angular2/*': '/angular2/*.js', // angular         'rtts_assert/*': '/rtts_assert/*.js', // runtime assertions         'app': 'app.es6' // my-app component     };      // kick off application     system.import('app');     </script> </body>  </html> 

and app.es6 :

import {component,template} 'angular2/core'; import {bootstrap} 'angular2/platform/browser';  // annotation section @component({   selector: 'my-app' }) @template({   inline: '<h1>hello {{ name }}</h1>' })  // component controller class myappcomponent {   constructor() {     this.name = 'world!';   } }  bootstrap(myappcomponent); 

when use http-server (installed npm), "hello world!" not displayed chrome, firefox. idea why ?

thank :)


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -