nativescript-community / ui-persistent-bottomsheet

https://nativescript-community.github.io/ui-persistent-bottomsheet/
Apache License 2.0
12 stars 3 forks source link

Not work with Angular #2

Closed minhson95th closed 10 months ago

minhson95th commented 3 years ago

i've import module in app.module.ts image in main.ts image and in html file: image but nothing show, this is my screen apps when run Screenshot_20210309-141215 1

farfromrefug commented 3 years ago

import the install method and run it in your main.

minhson95th commented 3 years ago

i have import the install method and run it in main.ts look like this

in main.ts image

farfromrefug commented 3 years ago

@minhson95th sorry misread. you need to set the steps properties. it is an array of numbers telling these steps in height the bottom sheet can be at. look at the vue demo app

minhson95th commented 3 years ago

@minhson95th sorry misread. you need to set the steps properties. it is an array of numbers telling these steps in height the bottom sheet can be at. look at the vue demo app

i've run vue demo app and it's work but when apply in Angular, my app still not change anythings ( image my screen: Screenshot_20210309-141215 1

farfromrefug commented 3 years ago

don't know much about angular. but are you sure steps prop is seen as an array and not a string ?

minhson95th commented 3 years ago

don't know much about angular. but are you sure steps prop is seen as an array and not a string ?

i'm sure it's array, and if i change tag html<BottomSheet> to <PersistentBottomSheet> like as picture image my screen changed, but i can not gesture bottomsheet like vue demo app. I think bottom sheet have problem when run in Angular Screenshot_20210311-145021 1

farfromrefug commented 3 years ago

I think it needs a custom angular module. you can look at the drawer plugin from community. I think it should work about the same

minhson95th commented 3 years ago

I think it needs a custom angular module. you can look at the drawer plugin from community. I think it should work about the same

i'm newbie in Angular, i don't know how to fix for it work. Can you help me check it? My project need use it

farfromrefug commented 3 years ago

@minhson95th i am no angular dev. I can do it but not in the weeks to come. I am.totally under

minhson95th commented 3 years ago

@minhson95th i am no angular dev. I can do it but not in the weeks to come. I am.totally under

thanks, hope it work soon

Bezlepkin commented 3 years ago

@minhson95th i am no angular dev. I can do it but not in the weeks to come. I am.totally under

thanks, hope it work soon

Hi! Did you resolve this issue?

Bezlepkin commented 3 years ago

I solved it. You have to add "leftDrawer" directive to child element.

2021-06-09_16-54-44

I looked at the code, this plugin is a legacy ui-drawer. Apparently the code was not completely cleaned up :)

farfromrefug commented 3 years ago

@Bezlepkin it is a bug. It means the code was taken from my ui-drawer component. The angular part shoudl be fixed

minhson95th commented 2 years ago

Has anyone fixed this yet in Angular?

fpaaske commented 11 months ago

@minhson95th I know it's been a while, but this is working fine in my Angular app;

<BottomSheet
  [steps]="bottomSheetSteps"
  [stepIndex]="bottomSheetStepIndex"
  (stepIndexChange)="onStepIndexChanged($event)"
  [gestureEnabled]="gestureEnabled"
>
  <GridLayout
    rows="*"
    height="100%"
    width="100%"
  >
    <PullToRefresh row="0" (refresh)="refresh($event, true)">
      <ListView>
...
      </ListView>
    </PullToRefresh>
  </GridLayout>
  <GridLayout
    bottomSheet
    width="100%"
    rows="auto"
  >
...
  </GridLayout>
</BottomSheet>