Ionic Error popTo(opts?) Function

[10:52:59]  typescript: node_modules/ionic-angular/navigation/nav-controller-base.d.ts, line: 57
            Property 'popTo' in type 'NavControllerBase' is not assignable to the same property in base type
            'NavController'. Type '(indexOrViewCtrl: any, opts?: NavOptions, done?: Function) => Promise' is not
            assignable to type '(page: any, params?: any, opts?: NavOptions, done?: Function) => Promise'. Types of
            parameters 'done' and 'opts' are incompatible. Type 'NavOptions' is not assignable to type 'Function'.
            Property 'apply' is missing in type 'NavOptions'.

      L56:  pop(opts?: NavOptions, done?: Function): Promise;
      L57:  popTo(indexOrViewCtrl: any, opts?: NavOptions, done?: Function): Promise;
      L58:  popToRoot(opts?: NavOptions, done?: Function): Promise;

  1. Follow the path given in the error
  2. Find function popTo() on line 57 and remove the arguments
  3. save and do cmd ionic server again to start the ionic app.

Edit this Article
If you log in, you will be notified when someone leaves a comment.

Other users would like to know if this solution helped you.

© 2022 - ErnesTech - Privacy