How to make angular decorators minification friendly?

拈花ヽ惹草 提交于 2019-12-06 02:06:27

问题


How to can I make this code that I have minification friendly?

MyModule.config(['$provide',function($provide) {
    $provide.decorator("$exceptionHandler", function($delegate,$injector) {

I can't seem to do this:

  $provide.decorator("$exceptionHandler" , "$delegate","$injector", function($delegate,$injector) {

回答1:


You are missing the [. The pattern is the same that you successfully applied for config:

$provide.decorator("$exceptionHandler" , [ "$delegate","$injector", 
    function($delegate,$injector) {


来源:https://stackoverflow.com/questions/23946996/how-to-make-angular-decorators-minification-friendly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!