Problem Question,
I have a custom datepicker directive and want to link ng-model to it in the view.
<div my-date-picker ng-model="date">
{{date}}
</div>
the ng-model {{date}} does not display can anyone please tell me what i am doing wrong
I have plunker created http://plnkr.co/edit/bWpNITdjBLZJO1p221xe?p=preview.
you are using
<div my-date-picker ng-model="date">
datepicker dirctivethat means your going to replace inside of this div, by the template in the directive so your
{{ Date }}
is no longer there its replaced by the template.if u put
{{ Date }}
outside of the div it will workand note that model is not
date
it should beDate
coz the model name of the input isDate
check the directive templateworking plunker
OR you can add
{{ Date }}
to the directive template