Skip to content

Instantly share code, notes, and snippets.

@felixzapata
Created March 24, 2015 17:48
Show Gist options
  • Save felixzapata/912151a47e0c3d4f402f to your computer and use it in GitHub Desktop.
Save felixzapata/912151a47e0c3d4f402f to your computer and use it in GitHub Desktop.
How to trigger ng-change in directive test in AngularJS
// http://stackoverflow.com/questions/17626604/how-to-trigger-ng-change-in-directive-test-in-angularjs
changeInputValueTo = function(value) {
inputElm.val(value);
browserTrigger(inputElm, $sniffer.hasEvent('input') ? 'input' : 'change');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment