kmansoor
kmansoor

Reputation: 4345

Providing external data when bootstrapping Angular

Is there any Angular2-kosher style to transfer arbitrary server-side state to an Angular2 application at boot time.

This will allow to start the application with some known state.

Upvotes: 1

Views: 152

Answers (1)

tadman
tadman

Reputation: 211670

Setting window.isVerified sets a variable that's local to the verification successful window, not any other windows that may already be opened. It's an ineffective solution.

You may need to periodically poll the server for a user with an unverified account and check their verification status. You'll need to push that change of state from the server to the client and unless the user explicitly pushes a button that runs that check you'll have to do it for them.

Upvotes: 1

Related Questions