toniantunovi / ion-bottom-drawer

Bottom drawer component for Ionic 4
63 stars 16 forks source link

Ionic 4 compatibility #6

Closed neroniaky closed 5 years ago

neroniaky commented 6 years ago

Thanks for creating a working bottom drawer component. Have been looking for one with with proper states for a long time!

Unfortunately this library does not support ionic 4, because they changed the package to @ionic/angular and the Hammer dependency is missing. Got it working by modifying the imports. Don't know if I will have the time to create an PR, though.

clauabad commented 5 years ago

Hi, Can you tell me what you change to make it compatible to Ionic 4? Thanks.

lincolnthree commented 5 years ago

@neroniaky Hey! Do you think you could paste your updated code here? That would be super helpful!

zmarwa commented 5 years ago

Hello, For me it works with:

zmarwa commented 5 years ago

Hello, It works for development mode. But when trying to build a production release: ionic cordova build --release --prod android compile fails with:

ERROR in ../ion-bottom-drawer/ion-bottom-drawer.ts(7,13): Error during template compile of 'IonBottomDrawerModule'
  Could not resolve ionic-angular relative to [object Object]..

Any idea ?

kapilraghuwanshi commented 5 years ago

Hello, For me it works with:

  • install hammers npm install --save hammerjs npm install --save @types/hammerjs
  • import hammerjs into page.ts import 'hammerjs';
  • change alls imports like import { Platform, DomController, IonicModule } from 'ionic-angular'; with import { Platform, DomController, IonicModule } from '@ionic/angular' ;

Thank you for this.

kapilraghuwanshi commented 5 years ago

What if I just want - on every pan up/pan down, it should bounce to top/bottom only, no middle position to stay. How can I achieve this? @toniantunovi

Anyways, shouldBounce flag is not working in ionic 4 also.

toniantunovi commented 5 years ago

Hi, to achive the effect where there is no middle position just set minimumHeight and dockedHeight to 0.

I've implemented this for a hobby project of mine so I don't have much time for it. I will support ionic 4 when and if I decide to migrate this project to ionic 4.

kapilraghuwanshi commented 5 years ago

@toniantunovi It was not working as expected.

Since there are translateY function, we won't be able to achieve always top or bottom. Can you please help me to modify. Code {remove 3 2 other states, no translate Y method}. If user slides it should be at the top or if he slide down then it the bottom.

MHzarini commented 5 years ago

i have created another repo based on this with support for ionic 4

https://github.com/MHzarini/ion-bottom-nav-drawer

Sorry @toniantunovi but i need it ASAP.

Please, let me know if you have any comments/notices.

Justinio99 commented 5 years ago

@MHzarini thanks for providing this module. :) Could you please remove the console.log from ion-bottom-nav-drawer.js:249. My console is full with values. Thanks alot!

toniantunovi commented 5 years ago

I've implemented support for Ionic 4 so I'm closing this issue.

alex1kariuki commented 5 years ago

Hey it still isn't working for me on ionic 4. The screenshot below has some of the error details.

Screenshot 2019-06-19 at 15 15 48