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}}}}
scniro
  • 16,844
  • 8
  • 62
  • 106
pratiklodha
  • 1,095
  • 12
  • 20

1 Answers1

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"
tymeJV
  • 103,943
  • 14
  • 161
  • 157