After update 1.3.0: Exception from Tracker afterFlush function + .invoke of undefined


#1

After updating Meteor 1.3.0 and using Urigo:angular.

TypeError: Cannot read property ‘invoke’ of undefined

  Tracker.afterFlush(function () {
        $( document ).ready(function() {
            angular.element(document.body).injector().invoke(['$compile', '$document', '$rootScope',
                        function ($compile, $document, $rootScope) {
                            $compile($document)($rootScope);
                            if (!$rootScope.$$phase)
                                $rootScope.$apply();
                        }
                    ]);
       
        });
      })

but i’m getting object from angular.element(document.body) but when i’m trying injector it’s got undefined.
before upgradation it was working fine.


#2

Finally i got solution for this:

 var injector = angular.bootstrap(document, ['dashboard']);
                     injector.invoke(function($compile,$document,$rootScope){
                          $compile($document)($rootScope);
                          console.log("check rootScope", $rootScope);
                         if (!$rootScope.$$phase)
                          return $rootScope.$apply();
                        });