を発射ませんここでは、ここでNGクリック任意のイベント
<div ng-app="angularPHP">
<div ng-controller="mainpagecntl">
<div id="customer" class="cuscontainer" hidden="hidden">
<div>
<h3 class="modal-title" >Add customer</h3>
<i class="fa fa-times" id="clo" aria-hidden="true"></i>
</div>
<table>
<tr>
<div class="form-group" >
<td><label id="label" class="control-label">customer Name:</label>
<td><input type="text" class="form-control" ng-model="customer_name" />
</div>
</tr>
<tr>
<div class="form-group">
<td><label id="label" class="control-label">Address:</label></td>
<td><input type="text" class="form-control" ng-model="customer_add"/></td>
</div>
</tr>
</table>
<div class="madal-footer">
<button class="btn btn-primary" ng-click="custadd()">ADD</button><br />
</div>
</div>
</div>
</div>
は私の角度-jsの一部..ですイムは、詳細を入力しようとしているところから、私のHTML部分..です
var app = angular.module('angularPHP', []);
app.controller('mainpagecntl', function($http,$scope)
{
$scope.custadd= function()
{
data={
cname :$scope.customer_name,
cadd: $scope.customer_add,
}
$http.post("../pos_system/Widgets/addcust.php?add",data).success(function(data)
{
});
}
});
が、私はボタンをクリックしても何も起こらなかった。
ng-appディレクティブで角度を調整しましたか? ng-controller指令を使用していますか? – Amygdaloideum
ng-controllerディレクティブを使用しています。@ DanielBornstrand –
データオブジェクトにvarを指定します。クリック機能にconsole.logや警告を付けて確認してください。残りのコードをコメント – vbharath