TrackController
Controller for track. This controller is based on the Component of Mithril.js.
Installation
npm
npm install track-controller
Usage
const TrackController = ; static { ; // Define model name. **Required** }
TrackController is usable TrackComponent interfarce.
Before/After action
const TrackController = ; static { ; ; ; } { // Call before loading prosess. } { // Call after loading prosess. }
cycile
[constructor]
|
[oninit]
|
| ----- [before_action] // if has cache, not call `before_actions`
| |
| ----- [after_action]
|
[oncreate]
ExceptionHandling
Raise error
{ this; // Raise error. }
Lifecycle methods
Must call super method When override lifecycle method.
onparamschange
The onparamschanged()
hooks is called after change controller params.
// When change from `?hoge='aaa'` to `?hoge='bbb'` { // call }