[NG] 注入

$scope => 注入 這是必要的,沒有不能動.

 app.controller('testCtrl',['$scope',function($a){
$a.price=1000;
$a.count=5;

}]);

留言