How to use root Context from child Context #975
dethell
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Now that version 1.0 has the concept of loading another context from inside a specific route context I have updated one of our route contexts to work like this:
In my root level
_context.ts
file I have a constant I want to have available to any context that wants it. Let's call itcurrentStockPrice
:Now in any other context I can do this:
The reason I do the import of root context is so that I don't have to type
private rootContext
as:any
and now intellisense knows what shapes are available from the root.Enjoy the fruits of version 1.0!
Beta Was this translation helpful? Give feedback.
All reactions