Open lucipacurar opened 9 years ago
Sorry for the delay, I was busy on other projects.
Can you post an example to check it? I tested on the example.html
file and worked correctly.
No worries :)
scope : { datetimepickerOptions: '@' }
This means that inside the HTML you MUST interpolate the object datetimepicker-options="{{ myScopeOptions }}"
and serialize it inside the DOM attribute.
I think it's better to have it evaluated as an expression (&) inside the isolated scope, bidirectionally bound (=) if you try to change the options after the datepicker has been initialized, or even remove the isolated scope altogether since it's not needed right now.
This is more of a design preference, not an issue :) I realized how the directive works after looking through the code. I was simply using datetimepicker-options="myScopeOptions"
and that didn't work with scope.$eval
.
Hi,
Sorry about the long title, but creating an isolated scope prevents
scope.$eval()
from getting the options from the controller scope. You can safely remove the isolated scope.