Skip to main content
All CollectionsViral Loops key Integrations explainedF.A.Q
How to use the Viral Loops for Angular modules
How to use the Viral Loops for Angular modules

For the Milestone and Refer a Friend template

Fivos Stergiannis avatar
Written by Fivos Stergiannis
Updated over 5 years ago

In this article, we are going to describe the process of how to use our Milestone and Refer a friend template in Angular.

You can visit Github here to get the commits.

All you have to do is follow the instructions below:

  • Import the module in your app.module or any other module you want to use

  • Initialize the ViralLoopsService  by calling .init()  and passing in the campaign ids for any templates you may use. Look at app.component.ts for an example

  • Initialize the widgets by including the component in a top-level container (e.g app.component.html ). No widget will be visible at this point.

  • Use the milestone-counter, milestone-embed-form and milestone-widget components anywhere you want and they will only appear on that page, for example after login

It's important that in order to run the demo app you need to do it with ng serve  and browse to http:localhost:4200 .

The demo will only give you an example of how the Milestone template looks like. Here's one example of the Sign up and the Milestones widgets:

Did this article help you? Let us know!


​ 

Did this answer your question?