{"action":"created","issue":{"url":"https://api.github.com/repos/lathonez/clicker/issues/106","repository_url":"https://api.github.com/repos/lathonez/clicker","labels_url":"https://api.github.com/repos/lathonez/clicker/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/lathonez/clicker/issues/106/comments","events_url":"https://api.github.com/repos/lathonez/clicker/issues/106/events","html_url":"https://github.com/lathonez/clicker/issues/106","id":161781161,"number":106,"title":"no-constructor-vars breaks DI","user":{"login":"m5rk","id":96174,"avatar_url":"https://avatars.githubusercontent.com/u/96174?v=3","gravatar_id":"","url":"https://api.github.com/users/m5rk","html_url":"https://github.com/m5rk","followers_url":"https://api.github.com/users/m5rk/followers","following_url":"https://api.github.com/users/m5rk/following{/other_user}","gists_url":"https://api.github.com/users/m5rk/gists{/gist_id}","starred_url":"https://api.github.com/users/m5rk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m5rk/subscriptions","organizations_url":"https://api.github.com/users/m5rk/orgs","repos_url":"https://api.github.com/users/m5rk/repos","events_url":"https://api.github.com/users/m5rk/events{/privacy}","received_events_url":"https://api.github.com/users/m5rk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-22T20:43:27Z","updated_at":"2016-06-22T22:11:35Z","closed_at":null,"body":"I copied the `tslint.json` from this repository and updated my code to conform to the rules. That seemed to break my app. If I declare a provider in the ionicBootraps function:\r\n\r\n```typescript\r\nionicBootstrap(MyApp, [Authentication]);\r\n```\r\n\r\nbut then declare its visibility like so:\r\n\r\n```typescript\r\nexport class MyClass {\r\n  private auth: Authentication;\r\n\r\n  constructor(auth: Authentication) {\r\n  }\r\n```\r\n\r\nMyClass's auth is `undefined`. Whereas if I do this instead:\r\n\r\n```typescript\r\nexport class MyClass {\r\n  constructor(private auth: Authentication) {\r\n  }\r\n```\r\n\r\nIt Just Works™."},"comment":{"url":"https://api.github.com/repos/lathonez/clicker/issues/comments/227893382","html_url":"https://github.com/lathonez/clicker/issues/106#issuecomment-227893382","issue_url":"https://api.github.com/repos/lathonez/clicker/issues/106","id":227893382,"user":{"login":"lathonez","id":7236936,"avatar_url":"https://avatars.githubusercontent.com/u/7236936?v=3","gravatar_id":"","url":"https://api.github.com/users/lathonez","html_url":"https://github.com/lathonez","followers_url":"https://api.github.com/users/lathonez/followers","following_url":"https://api.github.com/users/lathonez/following{/other_user}","gists_url":"https://api.github.com/users/lathonez/gists{/gist_id}","starred_url":"https://api.github.com/users/lathonez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lathonez/subscriptions","organizations_url":"https://api.github.com/users/lathonez/orgs","repos_url":"https://api.github.com/users/lathonez/repos","events_url":"https://api.github.com/users/lathonez/events{/privacy}","received_events_url":"https://api.github.com/users/lathonez/received_events","type":"User","site_admin":false},"created_at":"2016-06-22T22:11:35Z","updated_at":"2016-06-22T22:11:35Z","body":"You need to set the class's instance of auth to the one passed in the constructor:\r\n\r\n```javascript\r\n\r\nexport class MyClass {\r\n  private auth: Authentication;\r\n\r\n  constructor(auth: Authentication) {\r\n    this.auth = auth;\r\n  }\r\n```\r\n\r\nPlease reopen if this doesn't work."}}
{"actor":{"display_login":"lathonez"}}