点按按钮不点击工作?

时间:2014-01-02 14:39:26

标签: javascript jquery angularjs

我正在开发一个web应用程序,它自动从js文件夹加载js文件,window.angular也返回true但不知何故我不能生成ng-click事件我的代码如下

<div ng-app="myApp">
<div ng-controller="bincontroller">
<button ng-click="updateModel()">Sample GET</button>
<button id="applydatatable">Apply datatable</button>
<table border="1" id="tab">

。 。

<script type="text/javascript">
var app = angular.module("myApp", []);
app.controller('bincontroller', [function($scope,$http) {
 $scope.updateModel = function() {
    $http({
        url: "localhost/../../..", 
        method: "GET",
        params: {data: {"markingPeriod":9,"syear":2013,"teacherId":"","startDate":"2013-11-25","endDate":"2013-11-26"},r:"xyz/v54/Attendance/Bin"}
    }).success(function(data){
        $scope.records = data.collection.response;
    });
}
}]);

我无法生成点击事件

0 个答案:

没有答案