8.3. 其它


    时间戳格式化 date

    1. <div ng-controller="TestCtrl">
      {{ a | date: 'yyyy-MM-dd HH:mm:ss' }}
      </div>

      <script type="text/javascript">
      var TestCtrl = function($scope){
      $scope.a = ((new Date().valueOf()));
      }

      angular.bootstrap(document.documentElement);
      </script>


    列表截取 limitTo ,支持正负数:

    1. {{ [1,2,3,4,5] | limitTo: 2 }}
      {{ [1,2,3,4,5] | limitTo: -3 }}


    大小写 lowercaseuppercase

    1. {{ 'abc' | uppercase }}
      {{ 'Abc' | lowercase }}