angular / batarang

AngularJS WebInspector Extension for Chrome
MIT License
2.43k stars 338 forks source link

angular.module(...).decorator is not a function #275

Closed op1ekun closed 8 years ago

op1ekun commented 8 years ago

When batarang is on there's no .decorator() method in angular.module API.

Example:

angular.module( 'Demo', []);

angular.module('Demo')
    .factory('greeting', function greetingFactory() {
        // I return a greeting for the given name.
        return function (name) {
            return "Hello " + name + "." ;
        }
    });

angular.module('Demo')
    .decorator('greeting', function greetingDecorator($delegate) {

        return function() { 
            return $delegate(name) + ' How are you doing?';
        };
    });

Trying to call .decorator() gives me:

angular.module(...).decorator is not a function

ENV: System: WIndows Server 2012 R2 Chrome: 46.0.2490.80 m Plugin: 0.10.1 Angular: 1.4.7

karptonite commented 8 years ago

I can confirm that this is an issue. Angular 1.4.7.

erwinmombay commented 8 years ago

will look into it

Narretz commented 8 years ago

Can we possibly maybe fix .decorator and .component close to the 1.5 release (which may happen before Christmas)? I can help with the implementation.

erwinmombay commented 8 years ago

@Narretz for sure, i haven't had a chance to look at this yet (really sorry!). we have a hangouts this thursday at 2pm PST if you wanted to talk about it! if not feel free to leave any info here :+1:

petebacondarwin commented 8 years ago

Is there a PR for this yet? If not I think @Narretz will knock one up, right?

petebacondarwin commented 8 years ago

Oh I just saw that it is here: https://github.com/angular/batarang/pull/284