AngularJSのソースをちょっと覗いたときに気がついたのですが、angular.element の実体は通常 jQueryLite なんですが、window.jQuery が設定されてる(jQuery読みこまれてる)と、jQueryを拡張して、angular.element にするんですね!
ドキュメントに書いてなかったよーなと思ってドキュメント見たら、ちゃんと書いてありましたw
angular.module("mymodule", []).directive("foo", ->
{
restrict: 'CA'
link: (scope, element, attrs)->
nexts = jQuery(element).nextAll()
#ごにょごにょ
return
}
)
とか書いてたところは
angular.module("mymodule", []).directive("foo", ->
{
restrict: 'CA'
link: (scope, element, attrs)->
nexts = element.nextAll()
#ごにょごにょ
return
}
)
って形に直そう...