-
-
Notifications
You must be signed in to change notification settings - Fork 927
pelonpelon edited this page Jul 21, 2015
·
35 revisions
Common questions found on Gitter, the Google Group, and StackExchange
Contributors: Please add links to gists instead of lengthy code examples
- Where can I find help learning Mithril?
- See the Mithril Community Page. Mithril developers are very friendly people!
- How can I add animation to my Mithril app?
- Leo wrote an article on integrating velocity.js here.
- There are community projects dealing with animation here.
- Animated Page Flip
- CSS translate
- How do I fix this error:
"Please ensure the DOM element exists before rendering a template into it."
- Try putting the script tag for the offending javascript as the last thing inside the body tag.
- A component that has no component ancestors (see Why doesn't my component render?)
- The component view function must return a virtual element, not an array of elements:
return m("div")
return [m("div")]
- Only a top-most component may return an array:
App.view = function(){ return [ m("div"), m("div") ] }
- How do I (re)initialize all controllers in my app?
m.route( m.route() )
- How do I unmount/unload a component?
- How do I make an m.route change without scrolling the page?
- call m.route in a setTimeout with duration 0 (This is a quirk of v0.2.0)