Skip to content

Instantly share code, notes, and snippets.

@icook
Created January 2, 2014 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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