Important Services
This page lists important services, their types, how to get them and their purpose.
JavaScript
Frontend
There are no predefined
Backend
You fetch services in your bundle via this.get<Translator>("translator")
or in your component via:
import app from "@mayd/app";
function doSth ()
{
const translator = app.get<Translator>("translator");
// ...
}
Core Services
Key | Type | Usage |
---|---|---|
|
| Confirm handler, to trigger a confirm dialog. |
|
| Registry for action handlers in CRUDs. |
|
| Registry for field handlers (= renderers) in CRUDs. |
|
| Global date formatter, to consistently format dates. |
|
| Main fetch client for all network activity. |
|
| Initializes form widgets in a container. If you load HTML via AJAX, you need to call it for the new DOM. |
|
| Registry for all hyperlink handlers. |
|
| Used for triggering a global loading overlay. |
|
| Used for dynamically modifying the meta title. |
|
| Open modals or automatically load and open modal forms. |
|
| Displays an overlay selector. |
|
| Router for all backend routes. |
|
| Helper to scroll elements / positions. |
|
| Slugger, if you need to generate slugs. |
|
| For displaying toasts in the backend. |
|
| Translator for all backend translations. |