Service portal Angular ng-templates Add button

briancrecelius
Kilo Explorer

I created a template, and actually added a button to the form.

however, I can not get onclick to trigger.

I put the onclick function on the widget it's self is there a better location?

 

Looking for ideas why this does not actually work.

 

<button name="lookup"  ng-if="formModel._fields[f.name].type=='reference'"  role="link" class="btn btn-primary btn-sm m-l-xs" ng-click="lookup()"  aria-label="${Select Record}">Select Record</button>
2 REPLIES 2

Conner M
Tera Guru

How are you calling the function? I see the ng-click which is good. Is it in your client script? If it is, do you have any logs in the script to see if it is running? Do you have it as $scope.yourfunctionname or c.yourfunctionname? 

 

Let me know and this could be a quick fix!

dvp
Mega Sage
Mega Sage

you function name should be

ng-click="c.lookup()"