Add example for mounting a component with args

This commit is contained in:
cavemansspa 2017-04-12 10:23:50 -04:00 committed by GitHub
parent 05990024e1
commit 7ad1b2edcf

View file

@ -27,6 +27,10 @@ var Counter = {
m.mount(document.body, Counter)
```
To pass arguments when mounting a component use:
```javascript
m.mount(element, {view: function () {return m(Component, attrs)}})
```
---
### Signature