Am using Angular2 . And in my Project I have a Josn file like.
[
{
"Name": "fruit",
"details": [
{
"Type": "apple",
"color": "red"
},
{
"Type": "grape",
"color": "violet"
}
]
},
.....]
I want to display all these data from the json in the smart table.
I Used valuePrepareFunction: (details) => {return details.Type;} in my smart
table column settigns . But it will not work .
source: LocalDataSource = new LocalDataSource();
constructor(private http : Http){
this.http.get('http://192.168.0.100:8000/json1')
.map(response => response.json())
.subscribe(data =>{ this.result = data
// alert(JSON.stringify(this.result));
this.source.load(this.result);});
}
This is what I am used to load the json data into smart table. But it displays
only the "Name" . But I want to display all the details in my
smart table. Is there any possible way to handle this??.. please help
--
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.