Add example for mounting a component with args
This commit is contained in:
parent
05990024e1
commit
7ad1b2edcf
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue