我是新的Anguar js。我的角度控制器不工作?
我創建了一個控制器和傳遞數據但我控制器不工作u能請幫助我。
我的代碼是這樣的
角碼
var app = angular.module('myApp', []);
app.controller('myController', function($scope) {
$scope.person=[
{name:"Raj", gender:"M"},
{name: "raja", gender:"M"},
{name:"sevitra" gender:"F"}
]
});
HTML 守則
<body ng-app="myApp">
<div controller="myController">
<a href="javascript:void()">
<button>Add New Field</button>
</a>
<div class="advance-menu-wraper">
<ul>
<li>
{{"person[0].name"}} + {{"person[0].gender"}}
<div class="head-text">Field 1:</div>
<div class="description-text">
<a href="#">How many staff members are proficient in Oracla programing</a>
</div>
</li>
<li>
<div class="head-text">Field 2:</div>
<div class="description-text">
<form name="addForm">
<textarea rows="2"></textarea>
<div class="send-btn">
<button>
<i class="fa fa-check">Submit</i>
</button>
</div>
</form>
</div>
</li>
</ul>
</div>
</div>
</body>
難道不應該{{「人.name [0]「}} + {{」persone.gender「}} be {{」person [0] .name「}} + {{」person [0] .gender「}}? – John 2014-09-05 07:56:15
你好@約翰我已經做到了這一點,但沒有工作請幫助我 – 2014-09-05 07:59:16