For some reason binding doesn't work on an input within ng-if
block in a directive
so this, doesn't work:
app.directive 'foo', ->
restrict: 'E'
scope:
type:'='
template: "<input ng-if=\"type === 'string'\" ng-model='filterText'>
<div> {{filterText}} </div>"
<foo type="'string'" />
it works fine outside of directive or without ng-if
. Wrapping input inside of a div with ng-if
not helping. Is it a bug?