ディレクティブ定義オブジェクトを使用する次のコード (Widget Uno 内) の機能上の違いは何ですか ( .. と呼ばれていると思います)...
angular.module("app").
directive("widgetUno", ["$http", function ($http) {
return {
// A whole bunch of crap going on here
},
templateUrl: "widgetUno.html"
};
}]);
...Widget Dos のこのコードは?
angular.module("app").directive('widgetDos', function($http) {
return function(scope, element, attrs) {
// A whole bunch of crap going on here
};
});
Widget Uno のようなディレクティブを Widget Dos に変換しようとしていますが、templateUrl はどこで参照すればよいですか? これは Widget Dos で可能ですか?