Created
April 6, 2016 14:04
-
-
Save kis/b2eebe0f5af815bf0b92142baddf0716 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var unwatch = scope.$watch(function() { | |
| return ngModel.$modelValue; | |
| }, function(newValue) { | |
| if (newValue && (newValue.charAt(0) == '&' || newValue.charAt(0) == '?')) { | |
| //scope[attrs.ngModel] = newValue.slice(1); | |
| } | |
| }); | |
| ngModel.$modelValue = newVal; | |
| scope.$on('$destroy', function() { | |
| unwatch(); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment