Skip to content

Instantly share code, notes, and snippets.

@wizardnet972
Last active April 15, 2018 11:05
Show Gist options
  • Select an option

  • Save wizardnet972/64af8bb7909546066fee45084ae5392c to your computer and use it in GitHub Desktop.

Select an option

Save wizardnet972/64af8bb7909546066fee45084ae5392c to your computer and use it in GitHub Desktop.
var users = [{
"id": 1,
"name": "Leanne Graham",
"username": "Bret",
"email": "Sincere@april.biz",
"address": {
"street": "Kulas Light",
"suite": "Apt. 556",
"city": "Gwenborough",
"zipcode": "92998-3874",
"geo": {
"lat": "-37.3159",
"lng": "81.1496"
}
},
"phone": "1-770-736-8031 x56442",
"website": "hildegard.org",
"company": {
"name": "Romaguera-Crona",
"catchPhrase": "Multi-layered client-server neural-net",
"bs": "harness real-time e-markets"
}
}, ...........];
your profile page:
//ngforeach ->
<div> your area of name: {{user.name}}</div>
<div>your area of geo are: {{user.address?.geo?.lat}}</div>
instend you can (profile page):
<username [name]="user.name" />
<user-address [address]="user.address" />
address comp:
<geo-comp [geo]="address.geo">
inside geo-comp:
<div>your area of geo are {{geo|json}}</div>
AND SO ON......
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment