Given this simple Angular module:
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"; } } });
How can I access the club and max in the controller function?
Thanks Jeff
source share