Search Posts

Author: Erisha

Ng-click not working but other ng-click working

I want to ask you some help in AngularJS. ng-click is not working on my code. here is the html: <div layout=”row” layout-align=”center center” ng-controller=”viewClasslistCtrl”> <div layout=”row” layout-wrap style=”padding-bottom: 32px;” ng-cloak> <span class=”deleteStud” ng-click=”deleteBtn(skey)”><img src=”assets/redclose.png”></span> </div> <md-button class=”btn rp-btn” ng-click=”test()” style=”width: 150px;”> Save </md-button> </div> here is the script: angular.module(“myApp”).controller(‘viewClasslistCtrl’, function ($scope, $http, $rootScope, $sce, selectedItem, assignmentModel, classModel, $timeout, $mdSidenav, $state, $mdDialog, $mdMedia, $log, $mdToast, studentListModel, courseModel, util) { $scope.test = function () { alert(“test”); […]