I'm using Angular v1.4.0-beta.4 and need to iterate an array inside a scope like that:
$scope.users = {
name:'PC Admin',
login:[
{
proto:'https',
user:'admin',
pass:'foobar'
},
{
proto:'ssh',
user:'root',
pass:'strang3'
}
],
ip:'192.168.1.2'
}
I have looked at Angular ng-repeat docs but can't figure it out. I tried many things the last was like that (html):
<ul>
<li ng-repeat="user in users.login track by $index">
<li>Usuario: {{user.login[$index].user}}<br></li>
<li>Clave: {{user.login[$index].pass}}<br></li>
</ul>
But can't show anything. If I show user.login[0].user or user.login[1].pass it shows ok, but how to iterate to show every data in the array? Thanks in advance!
liinside ofliand the outerliis not closed. This structure doesn't make sense.