Search code examples
angularjstypescriptangular-ui-gridui-grid

(angularjs ui grid)how to add an ng-click on the headercellclass?


I want an event in this name whenever I click It I mean i'm in typescript angularjs. I'm using angular Ui-Grid.

i want to make my header cell, clickable

is there a ways to insert an onclick event on the headercell of ui grid

I don't want to redesign the template I just want to add click event in the headercell


Solution

  • Do something like this

    <div ng-class="{ 'text-success': clicked, 'text-large': !clicked }">
    

    on controller

    $scope.setClass(new function(){
        $scope.clicked = true;
    })