starting intro
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
bcffa683db
commit
2eafef1371
@ -0,0 +1,16 @@
|
|||||||
|
import { TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { IntroService } from './intro.service';
|
||||||
|
|
||||||
|
describe('IntroService', () => {
|
||||||
|
let service: IntroService;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
TestBed.configureTestingModule({});
|
||||||
|
service = TestBed.inject(IntroService);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should be created', () => {
|
||||||
|
expect(service).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,41 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
import introJs from 'intro.js';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class IntroService {
|
||||||
|
private intro = introJs();
|
||||||
|
|
||||||
|
constructor() {}
|
||||||
|
|
||||||
|
startIntro() {
|
||||||
|
this.intro.setOptions({
|
||||||
|
steps: [
|
||||||
|
{
|
||||||
|
intro: 'Welcome to the web let me show you around!'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '#accueil',
|
||||||
|
intro: 'This is the logo of Memory Map.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '#quete',
|
||||||
|
intro: 'Click here to open the search bar on mobile.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '#add',
|
||||||
|
intro: 'This button toggles the mobile navigation menu.'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
element: '#amis',
|
||||||
|
intro: 'Here is the main navigation menu.'
|
||||||
|
},
|
||||||
|
],
|
||||||
|
exitOnOverlayClick: false,
|
||||||
|
disableInteraction: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
this.intro.start();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue