Reputation: 573
I have a directive in some html something really simple as in:
Date Picker<br/>
<div date-picker-extender></div><p></p>
Hello, David!!!
The directive itself is a quick sample so it looks like this:
app.directive('datePickerExtender', function () {
return {
restrict: 'A',
replace: true,
template: '<input size="12" type="text" ng-click="showDatePicker()" />',
controller: function ($scope) {
$scope.showDatePicker = function () {
$scope.$root.$broadcast('onShowDatePicker', {});
};
}
}
});
The oddest thing is that if I change the restrict to 'E', nothing below the directive in the markup shows up so I don't even the text 'Hello, David!!!'. Of course, changing the restrict to 'E", I change the markup to this:
<date-picker-extender />.
Can't figure out what the heck is going on.
Ideas?
Upvotes: 1
Views: 80