Skip to content

Instantly share code, notes, and snippets.

@icook
Created January 2, 2014 19:28
Show Gist options
  • Save icook/8225049 to your computer and use it in GitHub Desktop.
Save icook/8225049 to your computer and use it in GitHub Desktop.
mainApp.directive "rawNgModel", ->
require: "^ngModel"
scope:
rawNgModel: '='
link: (scope, element, attrs, ngModelCtrl) ->
ngModelCtrl.$parsers.splice 0, 0, ((viewValue) ->
scope.rawNgModel = viewValue
viewValue
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment