AngularJS初始化普通数组和对象数组

1 普通数组:
2 ng-init="persons=['john','jack']"
3 对象数组:
4 ng-init="persons=[{name:'john',age:20},{name:'jack',age:40}]"

 

posted on 2016-01-04 22:05  cag2050  阅读(2351)  评论(0编辑  收藏  举报

导航