Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Using IoC Container in Vue.js and TypeScript App
// ParentComponent.vue
<template>
<child-component></child-component>
</template>
<script>
import ChildComponent from './ChildComponent'
const MyDependency = {
foo: 'bar'
}
export default {
name: 'parent',
provide: {
MyDependency
}
}
</script>

You forgot add ChildComponent to components field in export default {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment