Hi,

Yes, the question is missing the details it needs to answer your question 
in a informed way. it's impossible to know without knowing the exact 
structure on your data.
It sounds like you got an big JS blob of denormalized data. That kind of 
data poses an challenge in its own. 
You can use functions like Object.keys in your template using a simple 
trick. 

Something like this will help:
import { Component } from 'angular2/core';

@Component({
  selector: 'my-story',
  template: `
    <div *ngFor="#a of keys(woot)" ><span *ngIf="woot[a]">{{a 
|json}}</span></div>
  `
})
export class StoryComponent {
  woot =  {bought:true, returned:'no', superBrandId:true, partnerBrand:false
};
  keys = Object.keys;
}

The span is there because it's a bad idea to use two template directives on 
one element. However, this is putting some extra logic in your templates.
A alternate solution might be creating a special pipe tailored to your data.

Regards
Sander

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to