Thursday 15 July 2010

compilation - AngularJS - $compile doesn't working -


I'm trying to use the $ compilation in AngularJS I am reading how to use the $ blanket.

My code:

  @EnumeratorDirective = () - & gt; After starting seeing the error, wrote it in my app. Restrict: 'A' area: Count: '@UIICount' link: (region, element) - & gt; Scope.size = element.val (). Length element.bind 'keyup', () - & gt; {{Size}} of {{Count}} & lt; / Div & gt; '' $ Compile (el.contents ()) (scope) element.parent () .andend (l)   

and this output is:

  Context: $ compilation is not defined on the link (http:/10.0.1.100:88/assets/js/app.js:697:9) at i (http://10.0.1.100:88/assets/ Js / angular / angular 1.0.7.min.js: 44: 6) but e (http://10.0.1.100:88/assets/js/angular/angular.1.0.7.min.js:39:307) Http://10.0.1.100:88/assets/js/angular/angular.1.0.7 at http: // at 10.0.1.100:88/assets/js/angular/angular.1.0.7.min.js38:372 .min JS: 39: 257 on the new SQLunter (http://10.0.1.100:88/assets/js/angular/angular.1.0.7.min.js:150ж23) at D (http: //10.0.10000 : 88 / assets / JS / angular / angular.1.0.7.min.js: 28: 174) Object o Rostentiate (http: //10.0.1.100:88 / eset / js / cube / eye.min.js: 28: 304) http://10.0.1.100:88/assets/js/angular/angular.1.0.7 .min.js: 52 Jun 03 9: Assets on the http: ///10.0.1.100:88/JS / Angular / Angu Lar.1.0.7.min.js: 43: 348   

What am I missing?

You need to inject the $ compilation service in your instructions to you AngularJS You can read about dependency injection in.

No comments:

Post a Comment