Hi,
I am new with Angularjs and typescript. Can anyone please help me with my query ?
I have a very simple grid comprising of 3 columns and a Delete button corresponding to each row. The data is bind to the grid as expected.
How can i find out which row has been clicked ?
I was able to achieve this using plain Javascript. I want to write the code purely in typescript.
Below is my code if needed to know what i have done.
code within the constructor of the controller :
this.gridOptions = {};
this.gridOptions.columnDefs = [{ name: "Name" }, { name: "Language" }, {
name: 'Remove',
cellTemplate: '<button class="btn btn-primaryRemove btn-xs" ng-click="grid.appScope.showMe()">Remove</button>'
}];
Function within the constructor:
showMe(): void {
alert("Hi");
}
Initially, i was trying to find out the row details, but later realized that a simple function is not getting called either.
This works when i tried using javascript with angularjs.
Help needed :
1. Why is the function not being called ?
2. If the function gets called, how can i get the row details ?
3. Can anyone share some good articles or tutorials or any material that would help me in using angular with typescript ?
Any help would be appreciated. Thank you,