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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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.tsfile 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 rootContextas:anyand 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