This is a migrated thread and some comments may be shown as answers.

Problem with template iside command

1 Answer 65 Views
ActionSheet
This is a migrated thread and some comments may be shown as answers.
ulises
Top achievements
Rank 1
ulises asked on 13 Feb 2018, 04:57 AM

Hello, I have a problem with my code.

In mi command i try to use a template whit a "If" statement, but doesn't work, what is wrong? 

 

command:
                            {
                                text: "Work",
                                click: function (e) {
                                    angular.copy(this.dataItem($(e.currentTarget).closest("tr")), vmOrd.DataRel);
                                    $scope.$broadcast('loadData', vmOrd.DataRel);                                   
                                    $scope.$apply();
                                },
                                template: '#if(Quantity != 0){# <a href="\\#" class="k-button k-button-icontext k-grid-Work"><span class="fa fa-2x fa fa-pencil-square-o text-default"></span></a> # } else {# <a href="\\#" class="k-button k-button-icontext k-grid-Work"><span class="fa fa-2x fa fa-pencil text-default"></span></a> #} #',
                            },

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 14 Feb 2018, 03:36 PM
Hello Ulises,

Thank you for the provided code.

I have tested the provided template and the condition works as expected on my end.

Below you will find a sample which uses the provided template. Could you please examine it and let me know what I am missing?


I look forward to your reply.


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ActionSheet
Asked by
ulises
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Share this question
or