Mithril-App
Composable apps for Mithril.js.
Create self contained mithril apps that can be nested into each other.
Usage
var m = ;var mApp = ; // set mithril's routing modemroutemode = 'hash'; var main = ; // add regular mithril componentsmain; main; var dashboard = ; dashboard; var user = ; user; // add other appsmain; // add other apps nested in a routemain; // now mount main app to DOMmain;
You shoud now have the following routes:
/
> Home/greeting
> Greetings earthlings/dashboard
> Dashboard/user/account
> My Account
Mounting multiple apps at once.
It's also possible to mount multiple apps with on use
-call
app
You can use either mithril components or other apps as values.