<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>angular.isDate</title> </head> <body ng-app="isDateExample"> <h1>angular.isDate</h1> <p> <span>描述:</span><br /> <span>判断参数是否是一个时间类型</span> </p> <p> <span>使用方法:</span><br /> <span>angular.isDate(value)</span> </p> <p> <span>参数:</span><br /> <span>value:判断的值</span><br /> </p> <p> <span>返回值:</span><br /> <span>boolean</span> </p> <hr /> <div ng-controller="isDatecon">{{vals}}</div> </body> <script src="../../js/angular.1.3.0.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> angular.module('isDateExample', []).controller('isDatecon', function($scope) { var val = 'yyy-MM-dd HH.mm'; $scope.vals = angular.isDate(val); }) </script> </html>