Sha256: f67ff4543da124ee9b37297b974ea35096cba0cb2dc869f00c74416dfd4a3c3d

Contents?: true

Size: 427 Bytes

Versions: 1

Compression:

Stored size: 427 Bytes

Contents

# its set value of element in attrs.value
angular.module('EssayApp.directives').directive("defValue", ['$parse', ($parse) ->
  restrict: 'A',
  scope: true,
  require: '?ngModel',
  link: (scope, element, attrs) ->
    if (attrs.ngModel && attrs.value)
      if attrs.stringToNumber
        $parse(attrs.ngModel).assign(scope, parseFloat(attrs.value, 10))
      else
        $parse(attrs.ngModel).assign(scope, attrs.value)
])

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
translation_cms-0.1.5 app/assets/javascripts/app/directives/def_value.js.coffee