0

的Index.html如何使用的WebPack中的WebPack的Visual Studio 2013

<!doctype html> 
    <html> 
    <head> 
    <base href="/">  
    <title>ng2-webpack</title> 
    </head> 
    <body> 
    <my-app>Loading content here ...</my-app>  
</body> 
</html> 

的Index.html在SystemsJS

<!DOCTYPE html> 
<html> 
<head> 
    <!-- Polyfill(s) for older browsers --> 
    <script src="node_modules/core-js/client/shim.min.js"></script> 
    <script src="node_modules/zone.js/dist/zone.js"></script> 
    <script src="node_modules/reflect-metadata/Reflect.js"></script> 
    <script src="node_modules/systemjs/dist/system.src.js"></script> 
    <script src="systemjs.config.js"></script> 
    System.import('app').catch(function (err) { console.error(err); }); 
</script> 
</head> 
<body> 
<my-app>Loading content here ...</my-app>   
</body> 
</html> 

数据库中检索代码

  this.headers = new Headers(); 
      this.headers.append('Content-Type', 'application/json; charset=utf-8');     
      let options = new RequestOptions({ 
       method: RequestMethod.Post, 
       url: "data.aspx/getvalue",     
       headers: this.headers, 
        body:{log:this.login} 
      }); 
      return this._http.request(new Request(options)).retry(2) 
      .map((response: Response)=>this.extractData(response)) 
      .do(data => {this.temp=data, console.log('getStepList:'+ JSON.stringify(JSON.parse(this.temp.d)))}) 
      .catch(this.handleError); 

使用systemsjs

当使用npm run command所有ts file converted into js然后run index.html in visual studio然后一切工作正常

开关systemjs到的WebPack

当我切换systemjs to webpack发展Index.html not include any filets file converted into js只有当构建应用程序使用npm run build等每次我必须构建应用程序,然后将该dist文件夹放入Visual Studio以从数据库获取数据。

I felt this process headache so can any one tell me how to use in `visual studio 2013` 

回答