We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Calling the msDropDown event with Angular2

Hi,I'm trying to do the same example that is in Countries list example without using jQuery or pure JavaScript (Project restrictions). I'm using Html, CSS and Angular2. I'm trying to invoke the msDropDown event in a select element. I get the select element by doing:let dropdown = document.getElementById("webmenu");But I cant find any msDropDown event in the element. Any of you know how I can do this? Or have a better solution taking into consideration the above restrictions?Thanks for any help,Daniel Serrão

1 Reply

PO Prince Oliver Syncfusion Team March 30, 2017 07:11 AM UTC

Hi Daniel,   
  
Thank you contacting Syncfusion support.   
  
We have a Dropdownlist control as per your requirement to use with HTML and angular 2. To bind event in our ejDropdownlist, have a look at the following code snippet.   
  
[HTML]   
Select a Country   
<input id="dropdown1" ej-dropdownlist [dataSource]="data" [fields]="fieldsvalues"[(value)]="value" (select)="onSelect($event)" />   

[TS] 
onSelect(event) {   
              console.log("Select event is triggered");   
  }   

Note: Our control is JQuery dependent.    
   
  
Refer to the following API documentation for list of all available API’s, Methods and events: https://help.syncfusion.com/api/js/ejdropdownlist 
  
Regards,   
Prince   


Loader.
Live Chat Icon For mobile
Up arrow icon