Ioc dynamic call [v5] #1819
Answered
by
thetutlage
sasha172017
asked this question in
Help
-
How can i call dynamic services in 5v which register in AppProvide, for example const { ioc } = require('@adonisjs/fold') const Config = app.use('Adonis/Src/Config') how can i do it? |
Beta Was this translation helpful? Give feedback.
Answered by
thetutlage
Oct 30, 2020
Replies: 1 comment 1 reply
-
You can access the container instance for the app as follows: import Application from '@ioc:Adonis/Core/Application'
Application.container.use('Adonis/Src/Config') |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sasha172017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can access the container instance for the app as follows: