AnsweredAssumed Answered

How to attach multiple actions to a popup template in 4.0

Question asked by trebor74 on Sep 13, 2016
Latest reply on Sep 13, 2016 by thejus.kambi

I am trying to attach multiple actions to the popup template using ESRI js api 4.0 it does't throw any errors into the console but doesn't display the action either, I can attach one action to a template and it works just fine I'm following this reference guide.

Code: https://jsbin.com/moqajuwugu/edit?html,output

 // Add this action to the popup so it is always available in this view  
var measureThisAction = {   
  title
: "Measure Length",   
  id
: "measure-this",   
  image
: "Measure_Distance16.png" 
}; 
var someotherAction = {   
  title
: "Someother Action",   
  id
: "other-action-this",   
  image
: "Measure_Distance16.png" 
};  
var template = { // autocasts as new PopupTemplate()   
  title
: "Trail run",   
  content
: "{name}",   
  actions
: [measureThisAction]  }; 
  template.actions.push(someotherAction);

Any help would be greatly appreciated.

Outcomes