鉴于这个简单的 Angular 模块:
angular.module('fixturesModule', [])
.directive('clubfixtures', function () {
"use strict";
return {
restrict: 'E',
replace: true,
transclude: true,
scope: {
club : "@club",
max : "@max"
},
templateUrl: "ClubResultsTemplate.html",
controller: function ($scope, $http) {
$http.get("data.json").success(function (data) {
$scope.results = data;
});
$scope.sortBy = "Date";
}
}
});
如何在控制器功能中访问俱乐部和最大值?
谢谢,杰夫