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

Builder content link

Builder public api key
17463bffda934a57b57c1514d1c821f1

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
Angular

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: