Am learning angularjs. I want to now is it possible to create constructor in angular? if it is yes, how to create constructor for controller? can any one help me on this thanks,
Am learning angularjs. I want to now is it possible to create constructor in angular? if it is yes, how to create constructor for controller? can any one help me on this thanks, |
|||
.controller(..)
method is the constructor. Maybe you can be more explicit about you have in mind and how the standard way of doing things doesn't fit that? – deceze Feb 3 at 9:48angular.module('appName').controller('ctrlName', constructorFunction);
. But it'll be difficult to inject providers, if you want to minimize the code. – Arnab Das Feb 3 at 9:49