<input type="file" my-file="angularVar" my-file-type="MY_STRING" />
angularVar is just a normal var on the scope, that I want to bind task-file to.
How do I make my-file-type accept a normal string though? Just something to pass through to the directive?
I have this:
scope: {
taskFile: '=',
taskFileType: '='
},
But what I want in my "link" logic is something like:
if (scope.myFileType != null && scope.myFileType == "MY_STRING") {
// do something
}
How can I do that? Without it trying to bind to some non-existant var called MY_STRING.
Cheers
attrs.myFileTypeinside your directive..no need to include that in your directive isolated scope..