{"action":"opened","issue":{"url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1858","repository_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap","labels_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1858/labels{/name}","comments_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1858/comments","events_url":"https://api.github.com/repos/ng-bootstrap/ng-bootstrap/issues/1858/events","html_url":"https://github.com/ng-bootstrap/ng-bootstrap/issues/1858","id":258804356,"number":1858,"title":"ng-bootstrap bundle does not work with angular AOT compiled version","user":{"login":"varghesep","id":12233474,"avatar_url":"https://avatars2.githubusercontent.com/u/12233474?v=4","gravatar_id":"","url":"https://api.github.com/users/varghesep","html_url":"https://github.com/varghesep","followers_url":"https://api.github.com/users/varghesep/followers","following_url":"https://api.github.com/users/varghesep/following{/other_user}","gists_url":"https://api.github.com/users/varghesep/gists{/gist_id}","starred_url":"https://api.github.com/users/varghesep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varghesep/subscriptions","organizations_url":"https://api.github.com/users/varghesep/orgs","repos_url":"https://api.github.com/users/varghesep/repos","events_url":"https://api.github.com/users/varghesep/events{/privacy}","received_events_url":"https://api.github.com/users/varghesep/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-19T12:35:08Z","updated_at":"2017-09-19T12:35:08Z","closed_at":null,"author_association":"NONE","body":"Please remember, the issues forum is __NOT__ for support requests. It is for bugs and feature requests only.\r\nPlease read https://github.com/ng-bootstrap/ng-bootstrap/blob/master/CONTRIBUTING.md and search\r\nexisting issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.\r\n\r\n### Angular AOT compiled with ng-bootstrap does not locate the components:\r\n\r\nThe ng-bootstrap works well if it is used in a non AOT setup. The instructions on [this page ](https://ng-bootstrap.github.io/#/getting-started)will work. The problem is when it is built for production with angular AOT.\r\n\r\nThe issues are so many when the app compiled to work with ng-bootstrap. This is the command that I used to generate the AOT compiled version as described on[ this page](https://angular.io/guide/aot-compiler).\r\n\r\n```\"node_modules/.bin/ngc\" -p tsconfig.json```\r\n\r\n1.  The first issue is that the ngc creates a separate folder called ```node_modules``` and ```@ng-bootstrap``` underneath it. This folder has all the factory files.\r\n\r\n![image](https://user-images.githubusercontent.com/12233474/30591739-a37d5b44-9d09-11e7-964c-8a9cddd60bdb.png)\r\n\r\nAs an example, the accordion folder contains all the factory files:\r\n\r\n![image](https://user-images.githubusercontent.com/12233474/30592014-c2761b66-9d0a-11e7-87c6-f58ae0a16de4.png)\r\n\r\nThe angular AOT should create only factory files of the components in the app, not the libraries that it depend on. If that is the case, running angular AOT compilation should not create any library factory files. During the run time, the app factory files should load the UMD module 'node_modules/@ng-bootstrap/ng-bootstrap/bundles/ng-bootstrap.js'\r\n\r\n2. Running ```ngc``` causes all components to be referenced in ```app.module.ngfactory.ts``` like below. \r\n\r\n![image](https://user-images.githubusercontent.com/12233474/30592180-69ad61fa-9d0b-11e7-8034-22675da1b808.png)\r\n\r\nConfiguring the ```systemjs``` configuration ```system.config``` to work with a relative path and a module map is difficult. I don't know also why an import of ```NgbModule.forRoot()``` is generating all these imports in the factory file :-( \r\n\r\n3. To get over the mapping issue, I updated the ```system.config``` the following way. This will get me through the initial set of errors related to mapping.\r\n\r\n![image](https://user-images.githubusercontent.com/12233474/30592477-83c962e0-9d0c-11e7-849c-56d543917678.png)\r\n\r\nBut then it ends up in another error:\r\n\r\n![image](https://user-images.githubusercontent.com/12233474/30592527-b8c3e42a-9d0c-11e7-8cc6-3021b8f72667.png)\r\n\r\n### Link to minimally-working plunker that reproduces the issue:\r\n\r\nThis is a build issue, so can't reproduce it on plunker.\r\n\r\n### Version of Angular, ng-bootstrap, and Bootstrap:\r\n\r\nAngular: 4.4.1\r\n\r\nAngular AOT Compiler: 4.4.1\r\n\r\nng-bootstrap: 1.0.0-beta.5\r\n\r\nBootstrap: v4.0.0-alpha.6\r\n"}}
{"actor":{"display_login":"varghesep"}}