{"action":"created","issue":{"url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/681","repository_url":"https://api.github.com/repos/johnpapa/angular-styleguide","labels_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/681/labels{/name}","comments_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/681/comments","events_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/681/events","html_url":"https://github.com/johnpapa/angular-styleguide/issues/681","id":137617688,"number":681,"title":"To which version of Angular does this apply?","user":{"login":"NevillePerkins","id":8456416,"avatar_url":"https://avatars.githubusercontent.com/u/8456416?v=3","gravatar_id":"","url":"https://api.github.com/users/NevillePerkins","html_url":"https://github.com/NevillePerkins","followers_url":"https://api.github.com/users/NevillePerkins/followers","following_url":"https://api.github.com/users/NevillePerkins/following{/other_user}","gists_url":"https://api.github.com/users/NevillePerkins/gists{/gist_id}","starred_url":"https://api.github.com/users/NevillePerkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NevillePerkins/subscriptions","organizations_url":"https://api.github.com/users/NevillePerkins/orgs","repos_url":"https://api.github.com/users/NevillePerkins/repos","events_url":"https://api.github.com/users/NevillePerkins/events{/privacy}","received_events_url":"https://api.github.com/users/NevillePerkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-01T16:16:51Z","updated_at":"2016-03-02T04:18:29Z","closed_at":null,"body":"I dive in and out of AJS every for few months so typically whenever I start another AJS project it is about 3 or 4 versions later than the last project I did. At one point there was a big shift in the way controllers have to be defined and then some people do everything inline and others use $inject. And now the whole IIFE thing? That really makes for ugly code adding whole extra level of indentation. Is this really necessary? \r\n\r\nThe sample project I downloaded from here uses v1.2 but am starting a new project with AJS v1.5. \r\nAre all these style guides still appropriate for AJS 1.5+? \r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/comments/191052012","html_url":"https://github.com/johnpapa/angular-styleguide/issues/681#issuecomment-191052012","issue_url":"https://api.github.com/repos/johnpapa/angular-styleguide/issues/681","id":191052012,"user":{"login":"zachlysobey","id":1310403,"avatar_url":"https://avatars.githubusercontent.com/u/1310403?v=3","gravatar_id":"","url":"https://api.github.com/users/zachlysobey","html_url":"https://github.com/zachlysobey","followers_url":"https://api.github.com/users/zachlysobey/followers","following_url":"https://api.github.com/users/zachlysobey/following{/other_user}","gists_url":"https://api.github.com/users/zachlysobey/gists{/gist_id}","starred_url":"https://api.github.com/users/zachlysobey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachlysobey/subscriptions","organizations_url":"https://api.github.com/users/zachlysobey/orgs","repos_url":"https://api.github.com/users/zachlysobey/repos","events_url":"https://api.github.com/users/zachlysobey/events{/privacy}","received_events_url":"https://api.github.com/users/zachlysobey/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T04:18:29Z","updated_at":"2016-03-02T04:18:29Z","body":"The use of IIFEs is defended in the relevant section of the styleguide:\r\nhttps://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md#iife You can probably do without it if it really bothers you (though I wouldn't), or perhaps find a solution that allows use of es6 modules -- which give you all the benefits of the IIFEs.\r\n\r\nThis guide is definitely still relevant in 1.5+. It doesn't (yet?) touch on the new `module.component` helper released in 1.5 though.\r\n\r\n> there was a big shift in the way controllers have to be defined\r\n\r\nController definitions from 1.0 still work in 1.5 AFAIK. There is some stuff that was *added* like controllerAs, bindToController, etc... and these are all discussed in the styleguide.\r\n\r\n> some people do everything inline and others use $inject\r\n\r\nThere are multiple approaches to this. This style-guide prefers the `$inject` syntax preferably done with some tooling rather than just typed out in-line.\r\n"}}