Check if a button is Clicked
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2018 02:58 AM
I have created a widget where i a giving one incident number and after clicking one button it will show the details of that incident.I am using html 'table' tag to show the incident records but the problem is it is showing the labels that i am using to show the incident records like 'called-id' even before i have clicked the button.How can i check if the button is clicked??
HTML:
Server Script:
Client Script:
Widget View:
My problem is the labels of incident details are showing even when i have not given any incident number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2018 03:57 AM
hi
Only show the entire section if there is something in the c.data object.
So modify the div above your table to this
<div ng-if="c.data">
The object should be empty until you press the button an call the server. If not you can check for a specific property in the object like
<div ng-if="c.data.caller">
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-16-2018 07:47 AM
You should take the result and add it into c.data object.
c.server.update().then( function(r) {
c.data = r.data;
});