Title: Built module distribution cannot be imported to other modules · Issue #6378 · angular/angular-cli · GitHub
Open Graph Title: Built module distribution cannot be imported to other modules · Issue #6378 · angular/angular-cli
X Title: Built module distribution cannot be imported to other modules · Issue #6378 · angular/angular-cli
Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.0.1 node: 7.9.0 os: darwin x64 @angular/common: 4.1.3 @angular/compiler: 4.1.3 @ang...
Open Graph Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.0.1 node: 7.9.0 os: darwin x64 @angular/com...
X Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.0.1 node: 7.9.0 os: darwin x64 @angular/...
Opengraph URL: https://github.com/angular/angular-cli/issues/6378
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Built module distribution cannot be imported to other modules","articleBody":"### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report -\u003e please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\n@angular/cli: 1.0.1\r\nnode: 7.9.0\r\nos: darwin x64\r\n@angular/common: 4.1.3\r\n@angular/compiler: 4.1.3\r\n@angular/core: 4.1.3\r\n@angular/forms: 4.1.3\r\n@angular/http: 4.1.3\r\n@angular/platform-browser: 4.1.3\r\n@angular/platform-browser-dynamic: 4.1.3\r\n@angular/router: 4.1.3\r\n@angular/cli: 1.0.1\r\n@angular/compiler-cli: 4.1.3\r\n\r\n### Repro steps.\r\n1. Create a module using `ng new` or by any other means\r\n2. Export a module from the built code. E.g., you can do\r\n ```\r\n @NgModule()\r\n export class SimplestModule { }\r\n ```\r\n inside of `src/main.ts` that gets generated by the new project.\r\n3. Create a second Angular project. Using `ng new` is fine.\r\n4. Import the exported module in your new project.\r\n ```\r\n import { SimplestModule } from '/path/to/other/module/dist/main.bundle';\r\n @NgModule({\r\n declarations: [ AppComponent ],\r\n imports: [ SimplestModule ],\r\n bootstrap: [AppComponent]\r\n })\r\n export class AppModule { }\r\n ```\r\n\r\nIf you import `{ SimplestModule }` the result will be `undefined`. If you import `SimplestModule` (i.e. `module.exports` that gets created), you will get an undecorated object.\r\n\r\n### The log given by the failure.\r\nFrom the project attempting to import: \r\n\u003e `Unexpected value XXX imported by the module 'AppModule'`\r\n\r\n### Desired functionality.\r\nYou should be able to use `ng` to build modules that can be imported into other modules. Currently modules that are built do not appear to be ready to be imported by other modules post-build.\r\n\r\nIn general it would be nice to have more documentation / tools surrounding the creation of third party modules or modules that are intended to be reused by other modules.","author":{"url":"https://github.com/ajcrites","@type":"Person","name":"ajcrites"},"datePublished":"2017-05-18T23:10:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/6378/angular-cli/issues/6378"}
| 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:6489e2af-0a3e-0ecf-d360-6a7432d76941 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EB0A:2FC61D:683D16:8BBF9A:6973F4BA |
| html-safe-nonce | 0921bf2fdee4798ca7b91cc63adc749b2179f5c9dae6fe5a8ed2f1b0a207052d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjBBOjJGQzYxRDo2ODNEMTY6OEJCRjlBOjY5NzNGNEJBIiwidmlzaXRvcl9pZCI6IjQzOTcxMjQwMDU0Mzc2MzM3MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f149b545e96c8bbbd2c2b9fcc9d307760060b06986f6a31ef09682ca806315f7 |
| hovercard-subject-tag | issue:229829168 |
| 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/6378/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aad848fbde89c15c3c540fa52a8e28be7d5e9f9357a6682173c6e846dfdc30ab/angular/angular-cli/issues/6378 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aad848fbde89c15c3c540fa52a8e28be7d5e9f9357a6682173c6e846dfdc30ab/angular/angular-cli/issues/6378 |
| og:image:alt | Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.0.1 node: 7.9.0 os: darwin x64 @angular/com... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ajcrites |
| hostname | github.com |
| expected-hostname | github.com |
| None | edd166dbd7a8c69304dd0f786a2ceae171d7a532d7f82516d7b971b6a831123e |
| 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 | 7f2d62d773fd1f2c679e2ea93329a72fda65310a |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width