Hi everyone!

I'm starting to try and wrap my head around angular 2. I'm currently working on 
a fairly big angular.js application that is very much data driven. To that end 
data that is received from the server is wrapped in a Javascript class and 
various generic templates will then translate that data into HTML. 

So, for instance I could to an <div item='id of the item'> so the data would be 
available on a scope level. I could then extend this to <div item="..." 
show="edit"> which would populate the div with the appropriate edit Form based 
on the state of the item. 

I've been digging through the angular docs, but I am unable to find any way to 
accomplish this (or some similar level of flexibility). Any pointers?

The thing is that this comes into its own when I get arrays containing various 
types of information. I just use ng-repeat and let the show directive figure 
out what to display. As long as every item has a, for instance, 'list' 
template, I'll get a nicely formatted list of things. 

If appreciate some help. I'm looking into angular2 mostly for performance 
reasons, since the amount of data I'm handling is quite large at times and I 
also see other benefits. 

Cheers 

Stefan 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" 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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to