Modals
Modals is dynamic popup windows that will lay above the sites content.
Message modal
Will open up a modal message view.
Error modal
Will open up a error modal message view. The key difference with the above message view is that this view also has the class error that will turn the text red if using built in CSS or tailwind.
Custom modal
You can also very easily create custom modals by binding existing or your custom views to them.
Set modal view
The first argument is the expected view, and the second argument is the modal config type. You can choose between "opener," "message," "ok," and "confirm." You probably want the "opener" option.
Now the modal view will be loaded, but it is empty, so we need to append some content to it. We do this by appending existing views.
Append view to modal
Now, let's append a view/component to the modal view by utilizing the $item
variable from the above example. Add the code below directly under the setView
modal code.
You can of cource utilze any view and multiple views.
Last updated