samedi 14 octobre 2017

Call component dynamically via string in Ember.js

I want to invoke a component via string. The reason is that I have on my DB a text and within that text I have some keys that I want to invoke a component in case they are listed in my app.

I know there is a helper to invoke components dynamically and I was wonder if could make use here somehow

Example:

let complexString = "This is my complex string . Etc, etc...";

The output would be:

This is my complex string <div of my helper...>. Etc, etc...

I've tried using triple brackets but that is only for < tags >.




Aucun commentaire:

Enregistrer un commentaire