1. What if the expression is *dynamic* and something like "firstName + lastName | uppercase | slice:0:3"? 2. $eval in the case of Angular1 can return an object reference, how that can be achieved in Angular 5?
On Wednesday, 10 February 2016 15:08:38 UTC+5:30, Sander Elias wrote: > > Hi Josh, > > While this might be possible using the compiler, I think it's much simpler > to solve this with the use of ES6 string templates > <https://developer.mozilla.org/nl/docs/Web/JavaScript/Reference/template_strings>. > > No costly operations are needed for that. > > var obj = {FullName:"Josh Pendergrass", Id:123}; > var expression = 'Name : ${FullName}`; > > Will render the same result. > (PS, those things are available natively in all modern browsers > <http://kangax.github.io/compat-table/es6/#test-template_strings>) > > Regards > Sander > -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
