Title: Production build service problem · Issue #953 · angular/angular-cli · GitHub
Open Graph Title: Production build service problem · Issue #953 · angular/angular-cli
X Title: Production build service problem · Issue #953 · angular/angular-cli
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/flight...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/angular/angular-cli/issues/953
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Production build service problem","articleBody":"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?\n\nOS: Linux x64, Fedora 23\nng-cli : 1.0.0-beta.5\nnode: 5.11.1\n\nReproduction Steps:\nGenerate a new app using `ng new ng-app`\nGenerate a new service using `ng g service flights`\nThen use the service in the app by adding it to the bootstrap list of dependencies and injecting it into the main component.\nServe it in production mode `ng serve -prod`\nLoad the app in the browser => `GET http://localhost:4200/app/flights.service.js 404 (Not Found)`\n\nThe app that shows the problem: https://github.com/petoknm/angular2-cli-issue\n\n\n\nThank you :smile: \n","author":{"url":"https://github.com/petoknm","@type":"Person","name":"petoknm"},"datePublished":"2016-05-29T08:44:31Z","url":"https://github.com/angular/angular-cli/issues/953"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ee2a316-0829-adf7-6f3f-fe6fd861a745 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E952:2EA937:2AE96:39DF4:6B059341 |
| html-safe-nonce | 31f46bde8ba3844ea04fef852cf06b833765c464f46ece91cc06faf83402cd2a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTUyOjJFQTkzNzoyQUU5NjozOURGNDo2QjA1OTM0MSIsInZpc2l0b3JfaWQiOiIxNzc0Mjg3OTcxNDQxNTQ2MDQ5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3b57411a41c9cfacf72739f0645650dc6f42d8c4bd7dec3fbd33f9ace0533e8f |
| hovercard-subject-tag | issue:157376002 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/953/issue_layout |
| twitter:image | https://opengraph.githubassets.com/21261a220c92f86868df216edb107b5a67770310009e93b806e255c69a3504d0/angular/angular-cli/issues/953 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/21261a220c92f86868df216edb107b5a67770310009e93b806e255c69a3504d0/angular/angular-cli/issues/953 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | petoknm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3b72fd2385d76a50ce0fe937d50bb4a81434432c4fd47866074a26f6cd03623f |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58e2bd32336f3dcee343ec627a4d09c7c444e214 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width