で働いていません。なぜこれが起こるのですか?jQueryが..私は問題にこだわっています、私のHTMLページ
$('#setting').change(function() {
alert("hi");
});
<div class="content table-responsive table-full-width">
<table class="table table-hover table-striped">
<thead>
<th>Settings</th>
</thead>
<tbody>
<tr>
<td>
<select id="setting" class="form-control">
<option>---Select---</option>
<option ng-repeat="item in settings" value="{{item.id}}">{{item.name}}</option>
</select>
<div id="btn" class="col-md-12" style="margin-top: 16px;">
<input type="button" name="Activate" value="Activate" />
<input type="button" name="Deactivate" value="Deactivate" />
</div>
</td>
</tr>
</tbody>
</table>
</div>
これで私を助けてください。あなたがへのより良い、その後angularjsで起動している場合
$scope.functionToCall = function(){
alert('hi');
};
:
<select id="setting" class="form-control" ng-change='functionToCall()'>
と、コントローラのスコープオブジェクトがこのfuncitonを追加で:事前
コード内のjqueryライブラリを参照する必要があります –
ページが読み込まれるまでスクリプトが実行されていないことを確認してください。 –
jQueryの背景がある場合、「AngularJSで考える」の可能な複製?](http://stackoverflow.com/questions/14994391/thinking-in-angularjs-if-i-have-a-jquery-background) – Vucko