Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Vue plugin for domain model constants #14

Open
grosscol opened this issue Oct 20, 2022 · 0 comments
Open

Implement Vue plugin for domain model constants #14

grosscol opened this issue Oct 20, 2022 · 0 comments

Comments

@grosscol
Copy link
Collaborator

Accessing the constants in src/domainModel/*.js requires at least an import and possibly an additional private variable declaration to make constants available to templates.

Replace with a vue plugin such that the constants can be provided to the app and the components that use them can simply inject them. E.g.

// in plugins/domainModel.js
app.provide('domain', domainModel)
// in a component
export default {
  inject: ['domain'],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant