Separate Angular2 TypeScript files and JavaScript files into different folders, maybe 'dist‘

后端 未结 16 2285
清酒与你
清酒与你 2020-11-28 19:52

I am using the 5 min quickstart from angular.io website, which contain a file structure like this:

angular2-quickstart
 app
   app.component.ts
   boot.ts
 i         


        
16条回答
  •  情歌与酒
    2020-11-28 20:33

    I'm working with Angular 2.4. I needed an extra step to make it work. This was update systemJs reference to main.js file in index.html it's, from:

    System.import('main.js').catch(function(err){ console.error(err); });

    to:

    System.import('dist/main.js').catch(function(err){ console.error(err); });

提交回复
热议问题