0
有沒有辦法讓ng顯示0長度字符串的工作''?使ng顯示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>