How To Create Your Own Global Helpers in AdonisJS

Опубликовано: 21 Октябрь 2024
на канале: Adocasts
1,168
24

In this lesson, we'll learn how we can create our own globally available helper methods & properties in AdonisJS. We'll install currency.js, wrap it in a brief custom class, and make our custom method available throughout our application by exporting them, importing them, and registering them as EdgeJS Globals.

👍 If You Enjoy This Video, Consider Hitting The Like Button!

🥁 Subscribe To Stay Notified For New Lessons:
https://www.youtube.com/adocasts?sub_...

📕 View on Adocasts:
https://adocasts.com/lessons/how-to-c...

📚 Chapters:
00:00 - Intro
00:55 - Creating Our Helper Service
02:48 - Usage In App Directory (Controllers, Exceptions, Models, etc)
04:16 - Usage in EdgeJS Views
07:40 - Outro

-----------------------------------------

🕸️ Website: https://adocasts.com
🐘 Mastodon: https://fosstodon.org/@adocasts
🐦 Twitter:   / adocasts  
👍 GitHub: https://github.com/adocasts