|
|
|
|
|
by standup75
4531 days ago
|
|
Never had this problem with coffeescript until... today. Some hours after I read this post. Thanks angular.module("blabla", []).directive "bla", -> template: """
<div>Whatever<div ng-transclude></div></div></div>
"""
scope: true
transclude: true
restrict: "E"
compile: (element, attributes) ->
$input = element.find "input"
for attr, value of attributes.$attr
$input.attr value, attributes[attr]
element[0].removeAttribute value (scope, element, attributes) ->
$input = element.find "input"
# do something with $input
# now $input is global to all directive and that sucks
|
|