My href values (which points to the route) here in the below code '#Categories', should be changing based on the c.name. Example: ifc.name is 'ABC' i should route the user to 'root1/ABC/:123' else ifc.name is 'DEF' i should route the user to 'root2/DEF'
Any help on this is highly appreciated.
<a data-ng-repeat="c in vm.List | orderBy: 'order'" href="#Categories/{{c. category}}/{{c.name}}" data-ng-show="c.count >0">
function getHomeConfigsCtrl($http, iService, $routeParams) {
var vm = this;
vm.List = [];
var promise =
iService.getConfig(ID);
promise.then(
function (result) {
angular.forEach(result.data. menu, function (value, key) {
vm.List.push(value);
});
},
function (errorPayload) {
$log.error('failure loading home page config', errorPayload);
});
};
댓글 없음:
댓글 쓰기