3

Im creating a link grabbing the data from below

enter image description here

<a href="#">{{ product.category.value }}</a>

This works great but having problems grabbing a slug from the data object.

enter image description here

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

0

1 Answer 1

4

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.