For some reason, the binding does not work at the input inside the ng-if block in the directive
therefore this does not 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 without or without ng-if directive. Entering content inside a div using ng-if does not help. This is mistake?
jsbin link
Agzam source share