How to run a context function on a specific page load?

Builder content link

Builder public api key

What are you trying to accomplish
I want to create two pages. On the second page, I want a context function to be called on init.
How do I achieve this? They share the same component in the angular app. Do I need a separate component?
If I directly put code into the ngonInit, it will be called for both pages? Do I need to manage and check states for this?

Code stack you are integrating Builder with

Hello @Kakshil,

We have provided an example in our Angular GitHub repository demonstrating how to pass context and state down to the Builder component. We recommend referring to it at the following link: