Situation:
I have an attribute directive that wraps it's element into a template. Here it is:
app.directive("myCustomInput", function(){
return{
restrict: "A",
replace: true,
scope:{},
transclude: "element",
template: "<div class='input-wrap'>"+
"<div ng-transclude></div>"+
"<i class='glyphicon glyphicon-chevron-down'></i>"+
"</div>"
}
});
And I use it like:
<input my-custom-input ng-model="data.input" type="text" />
Problem:
ng-model
doesn't work
Here is the plunker