-
-
Save justinyoo/455c9c907679cbfaa109a63945dcf11e to your computer and use it in GitHub Desktop.
Using IoC Container in Vue.js and TypeScript App
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
// App.ts | |
import Vue from "vue"; | |
import Component from "vue-class-component"; | |
import SERVICE_IDENTIFIER from "./models/Identifiers"; | |
import container from "./configs/DependencyConfigs"; | |
@Component({ | |
name: "App", | |
// Provides IoC container at the top level of VueComponent | |
provide: { | |
[SERVICE_IDENTIFIER.CONTAINER]: container | |
} | |
}) | |
export default class App extends Vue { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment