1
在「ng顯示」期間,文本沒有出現在GUI上。幫我說出代碼中的錯誤。在ng顯示期間,文本沒有出現在UI上
<div ng-app="myApp" ng-controller="myCntrl">
<form name="nishant" ng-submit="submit()">
<div>
Name : <input type="text" name="name" ng-minlenght="5"
required="required"> <span
ng-show="nishant.name.$error.minlength">required12</span>
</div>
<button name="button" type="submit">SUbmit</button>
</form>
<script type="text/javascript">
var app = angular.module("myApp", []);
app.controller("myCntrl", function($scope) {
alert("nishant");
$scope.submit = function() {
alert("in the submit");
}
});
</script>
</div>
請看看爲什麼ng-show沒有出現在屏幕上。如果我刪除我的控制器它出現。
沒有增加,甚至NG-模型還我沒有得到過我的screen.Kindly,幫助NG秀封郵件後。 –
@NishantSingh你糾正了'ng-minlength'你能提供一個JSFiddle嗎? –
雅我也coorected,如果我加入控制器,只有它不出現。什麼是JSFiddle我不知道。 –