ng2-swipe-cards icon indicating copy to clipboard operation
ng2-swipe-cards copied to clipboard

Does it supports angular 4?

Open Kishoremt opened this issue 6 years ago • 7 comments

Kishoremt avatar Mar 14 '18 06:03 Kishoremt

Hi,

Yes it works well. I am using it on a Ionic 3 (last version)

aless673 avatar Mar 14 '18 09:03 aless673

Thanks for quick response. I am trying to use it in a web applications, but getting some issue in integrations. I am getting the below error "Uncaught Error: Unexpected value 'SwipeCardsModule' imported by the module 'AppModule'. Please add a @NgModule annotation." I have imported ng2-swipe-card in my app module. Please let me know if have to make some changes.

Thanks in Advance.

Kishoremt avatar Mar 14 '18 09:03 Kishoremt

@Kishoremt Please paste your src/app.module.ts

aless673 avatar Mar 14 '18 09:03 aless673

import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; // import { SwipeCardsModule } from 'ng2-swipe-cards/index'; import { SwipeCardsModule } from 'ng2-swipe-cards/ng2-swipe-cards';

import 'hammerjs';

import { AppComponent } from './app.component';

@NgModule({ declarations: [ AppComponent, ],

imports: [ BrowserModule, SwipeCardsModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }

Kishoremt avatar Mar 14 '18 09:03 Kishoremt

Fix your imports :

import { ErrorHandler, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { SwipeCardsModule } from "ng2-swipe-cards";

aless673 avatar Mar 14 '18 09:03 aless673

What about HammerJs? where should i add it?

Kishoremt avatar Mar 14 '18 09:03 Kishoremt

Can we give Click function for image inside the card?

Kishoremt avatar Mar 16 '18 07:03 Kishoremt