Skip to content

$ionicScrollDelegate not working for ionic popups (ion-modal-view) #5897

@ashutosh-akss

Description

@ashutosh-akss

I am trying to resize modal view height after adding dynamic content.

I have given delegate-handle to my content

<ion-modal-view>
     <ion-content delegate-handle="create-post">

     </ion-content>
</ion-modal-view>

and then from my controller i am calling

$ionicScrollDelegate.$getByHandle('create-post').resize();

but it gives following error

ionic.bundle.js:21157 Delegate for handle "create-post" could not find a corresponding element with delegate-handle="create-post"! resize() was not called!
Possible cause: If you are calling resize() immediately, and your element with delegate-handle="create-post" is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to resize() and try again.

if i echo my $ionicScrollDelegate i get 3 instances.

this works for normal view.. any suggestions?

Thanks in advance

Cordova CLI: 6.0.0
Ionic CLI Version: 1.7.12
Ionic App Lib Version: 0.6.5
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.4 LTS
Node Version: v5.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions