ngplayground
ngplayground

Reputation: 21667

AngularJS Access object

When in AngularJS

I write the following Edit {{locations}} Home

It shows as Edit [{"title":"Hello","gps":"1"}] Home

When I try Edit {{locations.title}} Home

It shows as Edit Home

What would I need to do in order to get it to show as Edit Hello Home

Thanks

Upvotes: 0

Views: 48

Answers (1)

Jayram
Jayram

Reputation: 19588

It says nothing because your locations is an array. So access it like this {{locations[0].title}}.

Upvotes: 3

Related Questions