angularjs - Angular.js Function not loading in directive -


i creating directive in angular , trying understand why function link not loading, if insert console.log('i working'); before function link able see message in console.

but if insert console log inside link function not load in page, ideas happenning? why cannot console.log message in function link?

angular.module('components').directive('slider', [   'jquery',   function slider($) {     'use strict';      var       scope = {}; console.log('i working');       function link($scope, $element) {       console.log('function link loading');             $('.slider').slick({   centermode: false,   infinite: false,   centerpadding: '2px',   slidestoshow: 6,   speed: 200,   index: 2,    variablewidth: true,   responsive: [{     breakpoint: 768,     settings: {       arrows: false,       centermode: true,       centerpadding: '40px',       slidestoshow: 3     }   }, {     breakpoint: 480,     settings: {       arrows: false,       centermode: true,       centerpadding: '40px',       slidestoshow: 1     }   }] });  }      return {       restrict: 'a',       scope: scope,       templateurl: 'app/components/slider/slider.html',       link: link     };   } ]); 


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -