Reputation: 167
Im creating a link grabbing the data from below
<a href="#">{{ product.category.value }}</a>
This works great but having problems grabbing a slug from the data object.
how do I get the slug?
<a ui-sref="{{ product.category.data.109923...slug }}">{{ product.category.value }}</a>
Please remember the 109923 object will change on different pages so cant be hard coded in. I hope someone can help
Upvotes: 3
Views: 68
Reputation: 1907
Watch your changeable object by using $watch
Like :
$scope.$watch('data', function (watch) {
// watch your object here
})
May be this will help you
OR
You can use ng-repeat
for your data, Like :
<div ng-repeat="d in data" >
<a ui-sref="">{{ product.category.d.109923...slug }}</a>
</div>
Upvotes: 4