Can't get AngularJS decorator for TextAngular to work -
i'm not sure totally understand decorators in angularjs - i'm trying modify textangular in example: https://github.com/fraywing/textangular/wiki/setting-defaults
my code:
angular.module('myangularapp', ['cfp.hotkeys', 'omr.angularfilednd', 'textangular']); angular.module('myangularapp', ['textangular']).config(['$provide', function ($provide) { // changing classes of icons $provide.decorator('tatools', ['$delegate', function (tatools) { tatools.bold.iconclass = 'icon icon-button'; return tatools; }]); }]);
with decorator active, blank web page, no error messages.
any ideas?
@joeljeske comment correct - module, don't redeclare it.
angular.module('myangularapp', ['cfp.hotkeys', 'omr.angularfilednd', 'textangular']); angular.module('myangularapp').config(['$provide', function ($provide) { // changing classes of icons $provide.decorator('tatools', ['$delegate', function (tatools) { tatools.bold.iconclass = 'icon icon-button'; return tatools; }]); }]);
Comments
Post a Comment