Merge pull request #1797 from cavemansspa/cavemansspa-patch-1

Add example for mounting a component with args
This commit is contained in:
Isiah Meadows 2017-04-13 10:02:41 -04:00 committed by GitHub
commit 70762bd2b5

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