我正在用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 {
}发布于 2016-02-27 06:36:45
我必须将这些代码行添加到我的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>https://stackoverflow.com/questions/35548052
复制相似问题