<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>angular.isUndefined</title> </head> <body ng-app="isUndefinedExample"> <h1>angular.isUndefined</h1> <p> <span>描述:</span><br /> <span>判断参数是否是一个Undefined</span> </p> <p> <span>使用方法:</span><br /> <span>angular.isUndefined(value)</span> </p> <p> <span>参数:</span><br /> <span>value:判断的值</span><br /> </p> <p> <span>返回值:</span><br /> <span>boolean</span> </p> <hr /> <div ng-controller="isUndefinedcon"> <div id="test">{{vals}}</div> </div> </body> <script src="../../js/angular.1.3.0.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript"> angular.module('isUndefinedExample', []).controller('isUndefinedcon', function($scope) { //var val = ''; var val; console.log(angular.isUndefined(val)) $scope.vals = angular.isUndefined(val); }) </script> </html>