Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

I wrote the following directive for watch input type="file":

app.directive("fileRead", [function () {
    return {
        link: function (scope, element, attributes) {
            element.bind("change", function (changeEvent) {
                console.log("change")
                scope.$apply(function () {
                    scope.iptImg = element.val()
                });
            });
        }
    }
}]);

$scope.$watch("iptImg",function(newValue,oldValue){
    console.log("file path"+newValue)
    console.log("the other code")
})

It works on Chrome, but it doesn't work on IE10, is there a way to make it run on IE10?

share|improve this question
    
Can you explain in a little more detail what happened when you tried this in Chrome (the behavior you expected) vs. what happened when you tried this in IE (the behavior you didn't want)? – Martin Atkins Jul 8 at 5:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.