Search code examples
javascripthtmlangularsystemjs

SystemJS, Browser Sync Setup


I am trying to follow the angular 2 setup guide and am having issues. I am using browsersync and I cannot seem to figure out how to get this code to work.

 <script>
   .......
  System.import('./app/boot')
        .then(null, console.error.bind(console));
  </script>

The application cannot find /app/boot.js because I am serving up the application using a gulp build process. I cannot access any directories with my "gulp serve" build process, and browser sync is being used. How can I go about using SystemJS in combination with browser sync so that it can find my boot.js file?

Sorry if this is a easy question. I am new to this kind of build process and normally it would be straightforward to just include the file. Thanks.


Solution

  • Well you are not posting you code from where we detect the whats error is in your code. but yes gulp with browsersync is a very good combination to make our project run smoothly. i think you are not importing your bootstrap file properly that's may be the error.

    still me to used same project setup for my project. i used gulp task with the browsersync in the angular2 you can refer to my repository for the help. this repo may help you to figure out whats the error

    https://github.com/MrPardeep/Angular2-DatePicker