<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                {% raw %} # AngularJS 表格 ng-repeat 指令可以完美的顯示表格。 ## 在表格中顯示數據 使用 angular 顯示表格是非常簡單的: ## AngularJS 實例 ``` <div ng-app="" ng-controller="customersController"> <table> ? <tr ng-repeat="x in names"> ??? <td>{{ x.Name }}</td> ??? <td>{{ x.Country }}</td> ? </tr> </table> </div> <script> function customersController($scope,$http) { ? $http.get("http://www.w3cschool.cc/try/angularjs/data/Customers_JSON.php") ? .success(function(response) {$scope.names = response;}); } </script> ``` ## 使用 CSS 樣式 為了讓頁面更加美觀,我們可以在頁面中使用CSS: ## CSS 樣式 ``` <style> table, th , td { ? border: 1px solid grey; ? border-collapse: collapse; ? padding: 5px; } table tr:nth-child(odd) { ? background-color: #f1f1f1; } table tr:nth-child(even) { ? background-color: #ffffff; } </style> ``` ## 排序顯示 如果需要對表格進行排序,我們可以添加 **orderBy** 過濾器:? ## AngularJS 實例 ``` <table> ? <tr ng-repeat="x in names | orderBy : 'Country'"> ??? <td>{{ x.Name }}</td> ??? <td>{{ x.Country }}</td> ? </tr> </table> ``` [Try it Yourself ?](/try/try.php?filename=try_ng_tables_orderby) ## 使用 uppercase 濾器 如果字母要轉換為大寫,可以添加 **uppercase** 過濾器:? ## AngularJS 實例 ``` <table> ? <tr ng-repeat="x in names"> ??? <td>{{ x.Name }}</td> ??? <td>{{ x.Country | uppercase}}</td> ? </tr> </table> ``` {% endraw %}
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看