1

I want to create a nested expression in ng-bind-html eventdetails is a json object white data gets the input from a return $stateParams function

<div class="into" ng-bind-html="{{eventdetails.{{data.genre.{{data.event}}.intro}}}}

1 Answer 1

1

You don't need any of the curly braces and use bracket notation to browse an object via variables, ng-bind-html is an Angular directive:

ng-bind-html="eventdetails[data.genre[data.event]].intro"
Sign up to request clarification or add additional context in comments.

2 Comments

must data.genre be in box brackets ?
yes, else it will look for the property "data" in eventDetails, while you're looking for "data.genre[data.event]]" in eventDetails.

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.