New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular2-joyride

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-joyride

Angular 2 Joyride Library

1.0.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

Angular 2 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.

Demo

See the demo. Let's take a tour! :earth_americas:

Install

npm install angular2-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 :wink:

Directive Inputs

You can use the joyrideStep directive with these inputs:

@InputRequiredPurposeValues
stepNumberYesThe order in which the step should appear during the tour.1, ..., n
stepPositionNoThe position in which the step will be drawn.'top', 'bottom'
titleNoThe step title.string
textNoThe 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

Keywords

angular

FAQs

Package last updated on 06 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts