Terminal 我的Angular2网站未使用Angular2 cli进行更新

Terminal 我的Angular2网站未使用Angular2 cli进行更新,terminal,npm,angular,angular-cli,Terminal,Npm,Angular,Angular Cli,我正在angular2中构建一个小应用程序,我正在尝试使用webstorm修改一个文件,看看它是否在我的浏览器中更新 我做了以下操作,到目前为止没有出现错误: npm i -g angular-cli ng new ponyracer ng serve (working on background) 在这个文件中,我将“PonyRacer4566”更改为“dshbhs”,但浏览器中没有任何内容得到更新 import {Component} from 'angular2/core'; @Co

我正在angular2中构建一个小应用程序,我正在尝试使用webstorm修改一个文件,看看它是否在我的浏览器中更新

我做了以下操作,到目前为止没有出现错误:

npm i -g angular-cli
ng new ponyracer
ng serve   (working on background)
在这个文件中,我将“PonyRacer4566”更改为“dshbhs”,但浏览器中没有任何内容得到更新

import {Component} from 'angular2/core';
@Component({
    selector: 'ponyracer-app',
    template: '<h1>PonyRacer4566</h1>'
})
export class PonyRacerApp {
}
从'angular2/core'导入{Component};
@组成部分({
选择器:“ponyracer应用程序”,
模板:“PonyRacer4566”
})
导出类PonyRacerApp{
}

我不得不将这些行添加到我的index.html中,以使其正常工作

<script src="vendor/es6-shim/es6-shim.js"></script>
  <script src="vendor/systemjs/dist/system-polyfills.js"></script>
  <script src="vendor/angular2/bundles/angular2-polyfills.js"></script>
  <script src="vendor/systemjs/dist/system.src.js"></script>
  <script src="vendor/rxjs/bundles/Rx.js"></script>

  <script src="vendor/angular2/bundles/angular2.dev.js"></script>
  <script src="vendor/angular2/bundles/http.dev.js"></script>
  <script src="vendor/angular2/bundles/router.dev.js"></script>


这是一个坏主意,因为你加载了所有你需要的自由。你检查过开发者工具->控制台有没有错误?