Why formatters does not work with isolated scope? Is this angular bug or I am doing something wrong?
This contains isolates scope and does not work: http://jsfiddle.net/YbdXQ/56/
restrict: 'A',
scope:{},
link: function(scope, elm, attrs, ctrl) {
ctrl.$formatters.unshift(function(modelValue) {
console.log("In formatters" + modelValue);
return $filter('date')(modelValue);
});
This does not contain isolated and scope works fine: http://jsfiddle.net/YbdXQ/57/
restrict: 'A',
link: function(scope, elm, attrs, ctrl) {
ctrl.$formatters.unshift(function(modelValue) {
console.log("In formatters" + modelValue);
return $filter('date')(modelValue);
});