I’ve got following function being provided at the app level:
provide('myProvidedFunction', (value) => {
console.log(value)
})
and it’s being injected like this:
const providedFunction = inject('myProvidedFunction')
How do I pass a parameter to the myProvidedFunction upon injecting so that I get a console.log
of that value?
I’ve tried this but it doesn’t work:
const providedFunction = inject('myProvidedFunction', 'item value')