有没有办法让 ng-show 为 0 长度的字符串工作?
angular.module('app', []).controller('app', appController);
function appController($scope) {
$scope.zero = '';
$scope.string = 'string';
$scope.n = null;
}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script>
<div ng-app="app" ng-controller="app">
<div ng-show="zero">MAKE THIS APPEAR</div>
<div ng-show="string">This appears, as usual</div>
<div ng-show="n">This should not appear, as usual</div>
</div>