Utilizing the TextAngular plugin and attempting to customize a toolbar, I am striving to inject my own service (LinkService
) into the module but encountering an
[$injector:unpr] Unknown provider
issue.
module.config(function($provide, LinkService){
$provide.decorator('taOptions', ['taRegisterTool', '$delegate', function(taRegisterTool, taOptions){
// $delegate is the taOptions we are decorating
// register the tool with textAngular
taRegisterTool('colourRed', {
iconclass: "fa fa-square red",
action: function(){
this.$editor().wrapSelection('forecolor', 'red');
LinkService.createLink(/*...*/)
}
});
// add the button to the default toolbar definition
taOptions.toolbar[1].push('colourRed');
return taOptions;
}]);
});
Can you guide me on how to inject my service into this configuration?