Skip to content

Commit

Permalink
Update view.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yurikuzn committed Jun 13, 2023
1 parent 58274d1 commit 4dcd8f4
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/development/view.md
Expand Up @@ -157,12 +157,14 @@ See more about [templates](frontend/templates.md).

Note: When you extend a view that already has its *events* and you want to add more events, do it the following way:

```js
events: {
'click a[data-action="test"]': function (e) {
},
...Dep.prototype.events
},
```js
setup() {
super.setup();

this.events['click a[data-action="test"]'] = (e) => {

};
}
```

See [the source file](https://github.com/yurikuzn/bull/blob/master/src/bull.view.js) of the view class.
Expand Down

0 comments on commit 4dcd8f4

Please sign in to comment.