[AngularJS] Decorate $onInit method of component in 1.5 for common functionality

2017-12-02 Thread J Java
I would like to have a decorator for $onInit of components to execute common functionality. Something like preInit postInit applicable to all components (or optionally selective components) I came up with some thing like this : https://jsbin.com/vevexik/1/edit?html,js any thought if above is

[AngularJS] Re: breaking down monolithic index.js

2017-12-02 Thread Zlatko Đurić
Well the recommended pattern is to break down code by components. So try to make at least as many folders as you have specific pages and put code for each individual page into it's individual folder. And when you see some code that you're repeating (it's common to all, e.g. some specific