Skip to content

Commit

Permalink
Added tips related to kebab-case to camelCase for directives
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludo237 committed Feb 28, 2016
1 parent 73d7455 commit dcb7857
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/guide/custom-directive.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ Vue.directive('example', {
})
```

<p class="tip">Da notare che si deve usare la sintassi camel-case `paramWatchers`, quasi si hanno attributi scritti in kebab-case.
Per esempio, se avete definisto l'attributo come `disabilita-effetto`, dovrete utilizzare `disabilitaEffetto` nel `paramsWatchers`.</p>


### deep

Se la vostra direttiva personalizzata si aspetta un oggetto, e deve sempre attivare la funzione `update` quando una proprietà interna all oggetto cambia, allora dovete attivare l'opzione `deep: true` internamente alla direttiva.
Expand Down

0 comments on commit dcb7857

Please sign in to comment.