i am trying intro.js to get working with my ionic 3 angular app. the steps i did is:
install: npm install intro.js --save
then in my index.html i have
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.7.0/introjs.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/intro.js/2.7.0/intro.min.js"></script>
in my home.ts
import introJs from 'intro.js/intro.js';
constructor() {
console.log('Hello DynamicHomeComponent Component');
this.expanded = false;
// Initialize steps
introJs.introJs().setOptions({
steps: [
{
element: '#id1',
intro: "Step one description",
position: 'right'
},
{
element: '#step_two_element_id',
intro: "Step <i>two</i> description",
position: 'bottom'
},
{
element: '#step_three_element_id',
intro: 'Step <span style="color: green;">three</span> description',
position: 'left'
}
]
});
introJs.introJs().start();
}
in html the id is added as below:
<ion-row style="border-top:1px solid #AFAFAF" text-wrap>
<ion-col [navPush]="accountPage" >
<ion-label class="widget-para-title widget-link" #id1>Accounts with open opportunities</ion-label>
</ion-col>
</ion-row>
however nothing happens when i run the app. no error as well in the logs for introjs
I changed :
to:
code at .ts file :
code at .html :