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

angular2-useful-swiper

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-useful-swiper - npm Package Compare versions

Comparing version 4.0.7 to 5.0.0-alpha.0

3

lib/swiper.component.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc