maxHeight.coffee 229 B

1234567891011
  1. define [
  2. "base"
  3. ], (App) ->
  4. App.directive "maxHeight", () ->
  5. return {
  6. restrict: "A"
  7. link: (scope, element, attrs) ->
  8. scope.$watch attrs.maxHeight, (value) ->
  9. if value?
  10. element.css("max-height": value)
  11. }