0

Let's say now I have template segment as below,

This is just a simple string - my name is {{name}}, I'm {{nationality}}, ...

and I have a model object, how can I parse it in angularjs 2?

I'm still quite new to ng2, now I am seeking something similar to mustache or razor template engine, just to parse a string like above.

SeleM
  • 9,310
  • 5
  • 32
  • 51
Elaine
  • 1,288
  • 5
  • 17
  • 35
  • 1
    Angular templates normally are statically compiled but also dynamic compilation support is available. See http://stackoverflow.com/questions/34784778/equivalent-of-compile-in-angular-2/37044960#37044960 for an example. – Günter Zöchbauer Dec 29 '16 at 14:33
  • Can you add a little bit more context. Parse into what? What are you trying to do? – codeepic Dec 29 '16 at 15:34
  • @codeepic the above answer should be what I just want :) you may click into the url – Elaine Dec 29 '16 at 15:37

0 Answers0