javascript - AngularJS Directive Object Has "No Method" -


i moving around code in angularjs app , have started receive error on customer directive. directive works fine in original, returning error listed below after i've moved few things.

i have been working through code try , find reference missed, file version off, or other reason why error popping up. i've unfortunately not found anything.

what might causing following error occur on angularjs directive?

typeerror: object [object object] has no method 'slider'    @ link (http://localhost:8000/static/modeling/js/directives/slider.js:9:13)    @ k (http://localhost:8000/static/js/angular.min.js:44:444)    @ e (http://localhost:8000/static/js/angular.min.js:40:139)    @ e (http://localhost:8000/static/js/angular.min.js:40:156)    @ e (http://localhost:8000/static/js/angular.min.js:40:156)    @ e (http://localhost:8000/static/js/angular.min.js:40:156)    @ k (http://localhost:8000/static/js/angular.min.js:44:382)    @ e (http://localhost:8000/static/js/angular.min.js:40:139)    @ e (http://localhost:8000/static/js/angular.min.js:40:156)    @ http://localhost:8000/static/js/angular.min.js:39:205 <slider id="slider" scale="scale" class="span2 ng-isolate-scope ng-scope"> 

my directive defined follows:

myapp.directive('slider', function() {     return {       restrict: 'e',       scope: {         scale: '='       },       link: function(scope, elm, attrs) {         console.log(elm);         elm.slider({  // !! line 9 (per error message) !!             min: 1,             max: 50,             step: 1,             value: 30,             slide: function(event, ui) {                 scope.scale = ui.value;                 scope.$apply();             }         })       }     } }); 

an example html tag being used is:

<slider id="slider" scale="scale" class="span2"></slider> 

it looks forgetting include jqueryui in reconfigured app.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -