0

I've this simple code, when put the ng-click on other elements it works, but on span tag it is not working, I've tried to increase the size of icon just to be sure, but still not working

<div class="customerHeader">
      <p class='customerName'>{{customer.first_name}} {{customer.last_name}}</p>
      <span ng-click="onCustomerClick(customer)" class="delete fa fa-close"></span>
</div>

and here is the associated controller


app.controller('CustomerController', ["$scope", "$http", function($scope, $http) {
    $scope.customerName = "Ahsan";
    console.log('Customer name')
    $http.get('app/resources/customers.json').then(data => {
        // console.log('request data: ', data.data);
        customerList = data.data;
        $scope.customers = data.data.slice(0, 15);
    });
    $scope.onCustomerClick = function(clickedCustomer) {
        console.log('Customer clicked', clickedCustomer.first_name);
    }
}]);
Nicholas K
  • 15,148
  • 7
  • 31
  • 57
Lint
  • 895
  • 3
  • 13
  • 32

0 Answers0