I'm trying to use this plugin (https://github.com/kachurun/timepicker) inside my angularjs application.
I'm trying to create a directive restricted to an Attribute, but the dial for selecting a time doesn't come up.
Here's the directive code:
angular.module('myTimePicker', []).directive('timePicker', function() {
var linkFunction;
linkFunction = function($scope, el, attrs) {
console.log("Scope: ", $scope);
console.log("El: ", el);
return console.log("Attrs: ", attrs);
};
return {
restrict: 'A',
link: linkFunction
};
});
Quite simple for now, I just wanted to try it out to see if it works.
In my html, I'm calling this like following:
<span class="edit-time-label">
From: <input style="background:red;" type="text" time-picker position="bottom" />
</span>
Again, really simple code.
The problem is that it is not displayed!
element in console.log is printed as input:
But no dial is displayed.
According to the documentation, it needs to be an input type="text" and it is.
Any suggestion?
EDIT:
here's a pen that replicates this issue: http://codepen.io/NickHG/pen/GZaROV?editors=1010
