Created
March 23, 2018 22:15
-
-
Save btakita/db70c440f307ed3de63da1de70da14cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>This is a top-level element.</p> | |
<Nested on:event1=event1(event) on:event2:1=event21(event)/> | |
<script> | |
import Nested from './Nested.html'; | |
export default { | |
methods: { | |
event1(event) { | |
console.debug('event1') | |
}, | |
event21(event) { | |
console.debug('event2:1') | |
} | |
}, | |
components: { | |
Nested | |
} | |
}; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>And this is a nested component.</p> | |
<script> | |
export default { | |
oncreate() { | |
this.fire('event2:1') | |
this.fire('event1') | |
console.debug('oncreate') | |
} | |
}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment