Confirming activation of Angular before itโ€™s loaded

Complete implementation and use cases

๐ŸฆŠ Reactive Fox ๐Ÿš€
๐ŸฆŠ Reactive Fox ๐Ÿš€
2 min readJul 2, 2018

--

Today letโ€™s take a brief look at a situation where we need to launch a part of an application before itโ€™s fully loaded.

Why would we need that?

  • To confirm the userโ€™s age
  • To get the userโ€™s agreement to Terms of Service
  • To display the login form
  • To enable switching the language from the loading page

NgxCanActivateApp!!! ๐ŸŽ‰

This library launches and renders your component all by itself. You specify the exact moment for your application to start.

You need to take five simple steps before you can use it.

Install ngx-can-activate-app

Create a component

It will be displayed until your application has finished activating.

Declare the component

Add it to declarations.

Import NgxCanActivateAppModule

Then add your component to the moduleโ€™s initialization.

Specify a selector in index.html

Add the selector of your component to index.html.

--

--

๐ŸฆŠ Reactive Fox ๐Ÿš€
๐ŸฆŠ Reactive Fox ๐Ÿš€

โšก๏ธ Making Fast faster ๐Ÿ‘ฉโ€๐Ÿ’ป Lead Software Engineer using @angular & @dotnet ๐ŸŒฑ Google Developer Expert for Angular โœ Tech Writer for @AngularInDepth ๐ŸฆŠ he/him