{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/325","repository_url":"https://api.github.com/repos/driftyco/ionic-app-scripts","labels_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/325/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/325/comments","events_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/325/events","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/325","id":187905955,"number":325,"title":"Service Dependency Injection doesn't work always with version 0.0.39","user":{"login":"savanvadalia","id":17091755,"avatar_url":"https://avatars.githubusercontent.com/u/17091755?v=3","gravatar_id":"","url":"https://api.github.com/users/savanvadalia","html_url":"https://github.com/savanvadalia","followers_url":"https://api.github.com/users/savanvadalia/followers","following_url":"https://api.github.com/users/savanvadalia/following{/other_user}","gists_url":"https://api.github.com/users/savanvadalia/gists{/gist_id}","starred_url":"https://api.github.com/users/savanvadalia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/savanvadalia/subscriptions","organizations_url":"https://api.github.com/users/savanvadalia/orgs","repos_url":"https://api.github.com/users/savanvadalia/repos","events_url":"https://api.github.com/users/savanvadalia/events{/privacy}","received_events_url":"https://api.github.com/users/savanvadalia/received_events","type":"User","site_admin":false},"labels":[{"id":454371645,"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/labels/needs_reply","name":"needs_reply","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-08T05:35:26Z","updated_at":"2016-11-10T02:48:12Z","closed_at":null,"body":"#### Short description of the problem:\r\nService dependency injection doesn't work always with version 0.0.39 (default is webpack with this version), however same code without any changes works fine for version 0.0.36 (default is roll-up with this version).  \r\nI am using Angular 2 barrels to organise my imports. Upon digging up the problem found that the  service getting failed worked fine if I import it as direct file reference. \r\n\r\n#### What behaviour are you expecting?\r\nService dependency injection should work regardless of webpack, rollup or barrels being used or not.\r\n\r\n#### Steps to reproduce:\r\n1. Privately Emailed @danbucholtz the sample code.\r\n2. run npm install on the project and doing ionic serve should give this error in the console\r\nUncaught Error: Can't resolve all parameters for LoginComponent: (App, NavController, MenuController, ?, Events, LocalStorageService, ErrorParserService).(…)\r\n3.  **May be a Barrel related issue**:  Error will go away if you change the import statement in LoginComponent\r\nimport { LoginService } from '../../account';\r\nTO \r\nimport { LoginService } from '../../account/login/login.service'; \r\nOR \r\nimport { LoginService } from './login.service';\r\n4.  **May be a webpack related issue**: Error on Step 2 will also go away if you downgrade ionic-app-scripts version to 0.0.36. To verify theory undo the code changes on Step-3 and downgrade the version to 0.0.36.\r\n\r\n#### Sample Code\r\n```\r\nimport { NavController, MenuController, App, Events } from 'ionic-angular';\r\nimport { Component } from '@angular/core';\r\n\r\nimport { LoginService } from '../../account';\r\nimport { UserRegistrationComponent } from '../../account/user-registration';\r\nimport { DevicesTabComponent } from '../../shared/navigation';\r\nimport { LocalStorageService } from '../../shared/storage';\r\nimport { LoginResponse } from '../../shared/contracts';\r\nimport { ErrorType } from '../../shared/constants';\r\nimport { ErrorParserService } from '../../shared/services';\r\n\r\n@Component({\r\n    templateUrl: 'login.component.html'\r\n})\r\nexport class LoginComponent {\r\n\r\n    public email: string;\r\n    public passWord: string;\r\n\r\n    public loginResponse: LoginResponse;\r\n\r\n    constructor(public app: App, public nav: NavController, public menu: MenuController,\r\n        public loginService: LoginService, public events: Events,\r\n        public localStorageService: LocalStorageService,\r\n        public errorParserService: ErrorParserService) {\r\n\r\n        this.loginResponse = new LoginResponse();\r\n    }\r\n```\r\n\r\n**Which @ionic/app-scripts version are you using?**\r\nYour system information:\r\nCordova CLI: 6.4.0\r\nIonic Framework Version: 2.0.0-rc.2\r\nIonic CLI Version: 2.1.4\r\nIonic App Lib Version: 2.1.2\r\nIonic App Scripts Version: 0.0.39\r\nOS: Windows 7 SP1\r\nNode Version: v6.9.1\r\n"},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/comments/259588372","html_url":"https://github.com/driftyco/ionic-app-scripts/issues/325#issuecomment-259588372","issue_url":"https://api.github.com/repos/driftyco/ionic-app-scripts/issues/325","id":259588372,"user":{"login":"danbucholtz","id":4680488,"avatar_url":"https://avatars.githubusercontent.com/u/4680488?v=3","gravatar_id":"","url":"https://api.github.com/users/danbucholtz","html_url":"https://github.com/danbucholtz","followers_url":"https://api.github.com/users/danbucholtz/followers","following_url":"https://api.github.com/users/danbucholtz/following{/other_user}","gists_url":"https://api.github.com/users/danbucholtz/gists{/gist_id}","starred_url":"https://api.github.com/users/danbucholtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danbucholtz/subscriptions","organizations_url":"https://api.github.com/users/danbucholtz/orgs","repos_url":"https://api.github.com/users/danbucholtz/repos","events_url":"https://api.github.com/users/danbucholtz/events{/privacy}","received_events_url":"https://api.github.com/users/danbucholtz/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T02:48:12Z","updated_at":"2016-11-10T02:48:12Z","body":"@savanvadalia,\r\n\r\nIf you run `ionic serve` does it work correctly? It only errors out on device, right? This seems to be an `ngc` error. Please let me know so we can address the situation.\r\n\r\nThanks,\r\nDan"}}
{"actor":{"display_login":"danbucholtz"}}