If you miss the array notation somewhere , to locate this we need to modify 
the angular code little bit, but its very quick solution.

change is *console.log("Array Notation is Missing",fn);* ( line no 11 from 
function start)

Find out annotate function in angular.js (non-minified)

  

    function annotate(fn) {
          var $inject,
              fnText,
              argDecl,
              last;
        
          if (typeof fn == 'function') {
            if (!($inject = fn.$inject)) {
              $inject = [];
              if (fn.length) {
    console.log("Array Notation is Missing",fn);
    fnText = fn.toString().replace(STRIP_COMMENTS, '');
            argDecl = fnText.match(FN_ARGS);
            forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
              arg.replace(FN_ARG, function(all, underscore, name){
                $inject.push(name);
              });
            });
          }
          fn.$inject = $inject;
        }
      } else if (isArray(fn)) {
        last = fn.length - 1;
        assertArgFn(fn[last], 'fn');
        $inject = fn.slice(0, last);
      } else {
        assertArgFn(fn, 'fn', true);
      }
      return $inject;
    }


On Monday, May 7, 2012 11:39:00 PM UTC+5:30, zhhz wrote:
>
> Hello, 
>
> Not sure I'm doing it the angular way. 
>
> I am playing with the angular-phonecat app (https://github.com/angular/ 
> angular-phonecat.git <https://github.com/angular/angular-phonecat.git>), 
> it works well until I minified the services.js. 
> I've added this line to the controller.js: 
>
> PhoneDetailCtrl.$inject = ['$scope', '$routeParams', 'Phone']; 
>
> Here is error info: 
>
> Error: Unknown provider: aProvider <- a <- Phone ("aProvider")@http:// 
> localhost:8000/app/lib/angular/angular.js:2492 
> getService("aProvider")@http://localhost:8000/app/lib/angular/ 
> angular.js:2620 ("a")@http://localhost:8000/app/lib/angular/angular.js: 
> 2497 getService("a",[object Array])@http://localhost:8000/app/lib/ 
> angular/angular.js:2620<http://localhost:8000/app/lib/angular/angular.js:2620>
>  
>
> Anyone can help me out this? (I'm using closure compiler with the 
> simple optimize switch turned on) 
>
> Thanks. 
>
> --zhhz

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to