4
我有點卡在這裏。我有一個應用程序使用引導程序模式與幾個文本框從服務器的值。當我第一次打開模式並從文本框ng-change事件觸發中刪除項目時。一旦所有的領域被清除,我關閉了模態。當我再次打開模式時,它會填充新值,但是當我從文本框中刪除項目時,ng-change事件不會被觸發。ng-change事件不會觸發文本輸入引導模式
但在這裏我找到了一個更奇怪的事情,只要我們在文本框中一個項目出現上述問題。
這裏是我的html代碼:
<tr>
<td>
<input only-numeric class="floatLeft" name="scoreSample" type="text" ng-model="scoreSample" id="scoreSample" ng-change="sampleMethod()" ng-model-onblur>
</td>
<td>
<input only-numeric class=" floatLeft" name="errorSample" type="text" ng-model="errorSample" id="errorSample" ng-change="sampleMethod()" ng-model-onblur>
</td>
</tr>
AngularJS代碼:
$scope.sampleMethod = function() {
alert("Coming here");
}
在此先感謝。對於這種情況的發生
你可以發佈你的代碼嗎? –
嗨,馬克,我已經發布了代碼。 – tanuj
你在哪裏定義了'sampleMethod'函數?順便說一句,在[輸入](http://devdocs.io/html/input)不得有結束標籤) – glepretre