I have angular app as below:
var myapp= angular.module('myapp',
['ngAnimate','ngDialog','angularUtils.directives.dirPagination','yaru22.angular-timeago','ui.date','textAngular'])
Now I want to add 'textAngular' dependencies separately so that I don't have to add all the related files in my layout/header file.
I have different controller files for every controller so I am trying something like below in my controller file which is separate from file where I have defined my app:
myapp.config(function(textAngular) {
$provide.decorator('taOptions', ['$delegate', function(taOptions){
taOptions.toolbar = [
//['h2', 'h3', 'h4'],
['p'],
['bold', 'italics'],
['redo', 'undo', 'clear'],
['insertLink'],
['wordcount', 'charcount']
];
return taOptions;
}]);
}).
run(function(textAngular) { // instance-injector
// This is an example of a run block.
// You can have as many of these as you want.
// You can only inject instances (not Providers)
// into run blocks
});
But This method is not working. As mentioned in SO question config can only be used to add providers and textAngular is I think module.