-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
I am trying to use a generated service in the main component. When I try to use a generated service in dev environment everything is fine. But when I switch to production is cannot find the service => GET http://localhost:4200/app/flights.service.js 404 (Not Found)
. The service is not present in the dist folder. Am I doing something wrong? Build is successful but for some reason the service is not there. If it is being bundled into index.js then it should not be requested from flights.service.js, right?
OS: Linux x64, Fedora 23
ng-cli : 1.0.0-beta.5
node: 5.11.1
Reproduction Steps:
Generate a new app using ng new ng-app
Generate a new service using ng g service flights
Then use the service in the app by adding it to the bootstrap list of dependencies and injecting it into the main component.
Serve it in production mode ng serve -prod
Load the app in the browser => GET http://localhost:4200/app/flights.service.js 404 (Not Found)
The app that shows the problem: https://github.com/petoknm/angular2-cli-issue
Thank you 😄