Coder Social home page Coder Social logo

thecodearcher / angular-image-slider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saadbinamjad/angular-image-slider

0.0 2.0 0.0 109 KB

Slider based on Angular 2+

Home Page: https://saadbinamjad.github.io/angular-image-slider/

TypeScript 72.54% JavaScript 11.58% HTML 6.22% CSS 9.67%

angular-image-slider's Introduction

angular-image-slider

Slider based on Angular 2+

Description

This project is my tiny attempt to publish my first node package. I may not continue to support this package. But lets see!

Installation

To install this module to an external project, follow the procedure:

  1. npm install angular-image-slider --save

  2. Add SliderModule and BrowserAnimationsModule import to your @NgModule like example below.

    import { BrowserModule } from '@angular/platform-browser';
    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
    import { NgModule } from '@angular/core';
    
    import { AppComponent } from './app.component';
    import { SliderModule } from 'angular-image-slider';
    
    
    @NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        BrowserAnimationsModule,
        SliderModule
    ],
    providers: [],
    bootstrap: [AppComponent]
    })
    export class AppModule { }

Usage

  1. You just need to construct a simple array containing image urls.

    import { Component } from '@angular/core';
    
    @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
    })
    export class AppComponent {
    
    public imagesUrl;
    
    ngOnInit() {
        this.imagesUrl = [
        'IMAGE_URL1.jpg',
        'IMAGE_URL2.jpg',
        'IMAGE_URL3.jpg',
        ];
    }
    }
  2. Use the array as an input in the component. 'images' is the name of the input for the slider component:

    <angular-image-slider [images]="imagesUrl"></angular-image-slider>

Demo

Online demo is here

Github:

https://github.com/saadbinamjad/angular-image-slider

Package:

https://www.npmjs.com/package/angular-image-slider

License

  • License: MIT

Author

  • Author: saadbinamjad

Keywords

  • Angular
  • Angular2
  • Angular 2+
  • Image Slider
  • Carousel
  • Slider

angular-image-slider's People

Contributors

angular-cli avatar saadbinamjad avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.