{"action":"created","issue":{"url":"https://api.github.com/repos/mgechev/angularjs-style-guide/issues/121","labels_url":"https://api.github.com/repos/mgechev/angularjs-style-guide/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/mgechev/angularjs-style-guide/issues/121/comments","events_url":"https://api.github.com/repos/mgechev/angularjs-style-guide/issues/121/events","html_url":"https://github.com/mgechev/angularjs-style-guide/issues/121","id":74978718,"number":121,"title":"Migration to Angular 2.0","user":{"login":"yanivefraim","id":1336186,"avatar_url":"https://avatars.githubusercontent.com/u/1336186?v=3","gravatar_id":"","url":"https://api.github.com/users/yanivefraim","html_url":"https://github.com/yanivefraim","followers_url":"https://api.github.com/users/yanivefraim/followers","following_url":"https://api.github.com/users/yanivefraim/following{/other_user}","gists_url":"https://api.github.com/users/yanivefraim/gists{/gist_id}","starred_url":"https://api.github.com/users/yanivefraim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanivefraim/subscriptions","organizations_url":"https://api.github.com/users/yanivefraim/orgs","repos_url":"https://api.github.com/users/yanivefraim/repos","events_url":"https://api.github.com/users/yanivefraim/events{/privacy}","received_events_url":"https://api.github.com/users/yanivefraim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mgechev/angularjs-style-guide/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"mgechev","id":455023,"avatar_url":"https://avatars.githubusercontent.com/u/455023?v=3","gravatar_id":"","url":"https://api.github.com/users/mgechev","html_url":"https://github.com/mgechev","followers_url":"https://api.github.com/users/mgechev/followers","following_url":"https://api.github.com/users/mgechev/following{/other_user}","gists_url":"https://api.github.com/users/mgechev/gists{/gist_id}","starred_url":"https://api.github.com/users/mgechev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgechev/subscriptions","organizations_url":"https://api.github.com/users/mgechev/orgs","repos_url":"https://api.github.com/users/mgechev/repos","events_url":"https://api.github.com/users/mgechev/events{/privacy}","received_events_url":"https://api.github.com/users/mgechev/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-05-10T18:58:47Z","updated_at":"2015-05-13T12:08:30Z","closed_at":null,"body":"What about adding style guidelines that are focused on preparing for Angular 2.0. \r\n\r\nI saw this [amazing](https://youtu.be/MC3DfMEBaKQ) video from ngVegas and read this [cool article](https://www.airpair.com/angularjs/posts/component-based-angularjs-directives), which let me think that we should really focus on preparing our apps so it will be much simpler to migrate to Angular 2 when the time comes.\r\n\r\nWhat do you think? Is there a place for a section like this in the guide?"},"comment":{"url":"https://api.github.com/repos/mgechev/angularjs-style-guide/issues/comments/101642963","html_url":"https://github.com/mgechev/angularjs-style-guide/issues/121#issuecomment-101642963","issue_url":"https://api.github.com/repos/mgechev/angularjs-style-guide/issues/121","id":101642963,"user":{"login":"roanbester","id":6660393,"avatar_url":"https://avatars.githubusercontent.com/u/6660393?v=3","gravatar_id":"","url":"https://api.github.com/users/roanbester","html_url":"https://github.com/roanbester","followers_url":"https://api.github.com/users/roanbester/followers","following_url":"https://api.github.com/users/roanbester/following{/other_user}","gists_url":"https://api.github.com/users/roanbester/gists{/gist_id}","starred_url":"https://api.github.com/users/roanbester/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roanbester/subscriptions","organizations_url":"https://api.github.com/users/roanbester/orgs","repos_url":"https://api.github.com/users/roanbester/repos","events_url":"https://api.github.com/users/roanbester/events{/privacy}","received_events_url":"https://api.github.com/users/roanbester/received_events","type":"User","site_admin":false},"created_at":"2015-05-13T12:08:30Z","updated_at":"2015-05-13T12:08:30Z","body":"A lot of the magic with migration is sticking to best practices in angularjs 1.x. Use modular code, separation of concerns etc. With angular 1.x, if you make use of services as intended, have thin controllers and componentized directives you're already halfway there.\r\n\r\nSo, I would keep the angularjs 1.x doc separate, as-is (as it probably already has the best practices stuff in) and create a separate one focusing just on the 2.0 angular stuff.\r\n\r\nCheck out this [site](http://gurustop.net/newsletter/10), especially the section\r\n\r\n### Getting your Angular 1.3/1.4 App Ready for Angular 2\r\n\r\n* Write code as ES6 classes, everything (directives, services, etc.)\r\n* Use the new Angular router (luckily it’s just around the corner)\r\n* Use directives more than controllers\r\n* Use the controllerAs syntax in your directives instead of using $scope"}}