Package Exports
- ngx-joyride
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ngx-joyride) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ngx-joyride
An Angular Tour (Joyride) library built entirely in Angular, without using any heavy external dependencies like Bootstrap or JQuery. From now on you can easily guide your users through your site showing them all the sections and features.
Info
In order to be compliant with the Angular 3rd Party Projects naming convention angular2-joyride has been renamed and moved to ngx-joyride
Demo
See the demo. Let's take a tour! 🌎
Install
npm install ngx-joyride
Usage
1. Mark your HTML elements with the joyrideStep
directive
<h1 joyrideStep title="Page Title" text="Main title!" stepNumber="2">Text</h1>
2. Import the JoyrideModule
in your AppModule
@NgModule({
declarations: [AppComponent],
imports: [
JoyrideModule,
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
3. Inject the JoyrideService
in your Component and start the Tour
@Component({
selector: 'app-component',
templateUrl: './app.component.html',
styleUrls: ['./app.component.sass'],
})
export class AppComponent {
constructor(private readonly joyrideService: JoyrideService) { }
onClick() {
this.joyrideService.startTour();
}
}
4. En-joy 😉
Directive Inputs
You can use the joyrideStep
directive with these inputs:
@Input | Required | Purpose | Values |
---|---|---|---|
stepNumber | Yes | The order in which the step should appear during the tour. | 1, ..., n |
stepPosition | No | The position in which the step will be drawn. | 'top', 'bottom' |
title | No | The step title. | string |
text | No | The step text content. | string |
Next features
- Adding 'right', 'left', 'fullPage' stepPosition values.
- More options for the tour (like changing the theme color, the step template and the step behaviour, ... )
- Allow you to use your custom Angular component inside the step.
- Feel free to ask or share your ideas!
Licence
MIT