I am using Hottowel,
I defined a directive:
(function() {
'use strict';
angular
.module('app')
.directive('directionDirective', directionDirective);
directionDirective.$inject = ['$window'];
function directionDirective ($window) {
// Usage:
// <directionDirective></directionDirective>
// Creates:
//
var directive = {
link: link,
restrict: 'A',
require : ['^ngModel'],
scope : {
ngModel : "="
},
};
return directive;
function link(scope, element, attrs, ctrl) {
var selectpicker = $(iElement);
selectpicker.selectpicker({
size : 10,
width : '100%',
noneSelectedText : 'No selection'
});
scope.$watch(function(){return
$(iElement).find("option").length }, function() {
selectpicker.selectpicker('refresh');
});
}
}
})();
I suspect I need a factory to get it to work, because I get errors stating
that it can't be found.
Can you point me in the right direction?
Michael
--
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.