angularjs變量的三種表示方式


1.在js中表示:
$scope.變量名,如:

    $scope.searchEntity = {};
    $scope.findPage = function (page, rows) {
        $http.post('../specification/findPage?page='+page+'&rows='+rows, $scope.searchEntity).success(function (response) {
            $scope.list = response.rows;
            $scope.paginationConf.totalItems = response.total;
        });
    }

2.在html代碼中表示普通文本:
{{變量名}},如:
```


{{item.id}}
{{item.specName}}

    ```

3.在html代碼中表示函數形參:
函數名(變量名),如:

		                                  <td class="text-center">                                           
		                                 	  <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#editModal" ng-click="update(item.id)">修改</button>
		                                  </td>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM