angular2-useful-swiper
Advanced tools
Comparing version 4.0.7 to 5.0.0-alpha.0
@@ -0,1 +1,2 @@ | ||
/// <reference types="swiper" /> | ||
import { ElementRef, AfterViewChecked, AfterViewInit, ChangeDetectorRef } from '@angular/core'; | ||
@@ -7,3 +8,3 @@ export declare class SwiperComponent implements AfterViewChecked, AfterViewInit { | ||
initialize: boolean; | ||
Swiper: any; | ||
swiper: Swiper; | ||
private swiperWrapper; | ||
@@ -10,0 +11,0 @@ private slideCount; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var core_1 = require("@angular/core"); | ||
//declare var Swiper: any; | ||
var SwiperComponent = (function () { | ||
@@ -26,3 +27,3 @@ function SwiperComponent(elementRef, changeDetectorRef) { | ||
SwiperComponent.prototype.setup = function () { | ||
if (!this.Swiper) { | ||
if (!this.swiper) { | ||
// if rendered on server querySelector is undefined | ||
@@ -32,3 +33,3 @@ if (this.elementRef.nativeElement.querySelector) { | ||
this.slideCount = this.swiperWrapper.childElementCount; | ||
this.Swiper = new Swiper(this.elementRef.nativeElement.querySelector('swiper > div'), this.config); | ||
this.swiper = new Swiper(this.elementRef.nativeElement.querySelector('swiper > div'), this.config); | ||
this.changeDetectorRef.detectChanges(); | ||
@@ -45,3 +46,3 @@ } | ||
this.slideCount = this.swiperWrapper.childElementCount; | ||
this.Swiper.update(); | ||
this.swiper.update(); | ||
} | ||
@@ -48,0 +49,0 @@ }; |
{ | ||
"name": "angular2-useful-swiper", | ||
"version": "4.0.7", | ||
"version": "5.0.0-alpha.0", | ||
"description": "Use iDangero.us's Swiper in Angular.", | ||
@@ -37,3 +37,5 @@ "directories": {}, | ||
}, | ||
"dependencies": {}, | ||
"dependencies": { | ||
"@types/swiper": "^3.4.4" | ||
}, | ||
"devDependencies": { | ||
@@ -40,0 +42,0 @@ "@angular/animations": "^4.0.1", |
@@ -217,10 +217,16 @@ ## angular2-useful-swiper | ||
..and then you can use the reference to access the **Swiper** property. | ||
..and then you can use the reference to access the **swiper** property. | ||
```html | ||
<button (click)="usefulSwiper.Swiper.createLoop()">loop</button> | ||
<button (click)="usefulSwiper.swiper.createLoop()">loop</button> | ||
``` | ||
To access the swiper instance and all of it's properties and methods use a viewchild. | ||
```typescript | ||
``` | ||
### Future | ||
Next step is to improve the TypeScript integration by creating an interface for the options. Maybe also create some content templates for frequently used sliders. |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
21347
114
0
232
2
2
+ Added@types/swiper@^3.4.4
+ Added@types/swiper@3.4.8(transitive)