Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

How do I access mat menu trigger from typescript

Figured it out. I just needed to use MatMenuTrigger instead of the element id.

@ViewChild(MatMenuTrigger) notificationMenuBtn: MatMenuTrigger;

If you really need to use an id (When you have several MatMenuTrigger)

@ViewChild('notificationMenuBtn', {read: MatMenuTrigger}) protected notificationMenuBtn : MatMenuTrigger;

Tags:

Typescript

Angular

Angular Material

Related

Listen to events inside iFrame Expression has changed after it was checked during iteration by map keys in angular 2 Create keras callback to save model predictions and targets for each batch during training How do I run JUnit 5 integration tests with the Maven Failsafe plugin? How to load external html file in a template in VueJs What's the right http status of locked user due to brute force attack? Send Post request to an external API using AWS Lambda in python How do I set the schema in SQLAlchemy for MSSQL? Using styled components with props and typescript How to design a Cloud Firestore database schema Swift String escaping when serializing to JSON using Codable Error "User limit of inotify watches reached". ExtReact build

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy