Including icons from from json files


#1

I have a JSON snippet here :smile :

[
    { "beforeImage" : "<i class=\"icon ion-log-in\"></i>" }
] 

Now in the view I want to access the icon. How should i do it?

{{ someObject.beforeImage }} 

and other stuff like this does not work.


#2

Oh snap! Got it. I forgot about the " " of the class attribute. Now I got it.

If anyone stumbles upon this here is the answer:

[
    { "beforeImage" : "icon ion-log-in" }
]

In the markup :

<i class={{topic.beforeImage}}></i>