Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created March 21, 2017 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/d9f59fe512a94fa164a6be7a7b0d87ee to your computer and use it in GitHub Desktop.
Save justinyoo/d9f59fe512a94fa164a6be7a7b0d87ee to your computer and use it in GitHub Desktop.
Using IoC Container in Vue.js and TypeScript App
// ChildComponent.vue
<template>
<p>{{ MyDependency.foo }}</p>
</template>
<script>
export default {
name: 'child',
inject: [ 'MyDependency' ]
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment