Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.
Ionic:
ionic (Ionic CLI) : 4.0.5 (/home/mrnvr/.config/yarn/global/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.2
@angular-devkit/core : 0.7.3
@angular-devkit/schematics : 0.7.3
@angular/cli : 6.1.3
@ionic/ng-toolkit : 1.0.6
@ionic/schematics-angular : 1.0.4
System:
NodeJS : v8.11.2 (/usr/bin/node)
npm : 6.3.0
OS : Linux 4.13
Describe the Bug
A clear and concise description of what the bug is.
Cannot use ViewController.
Steps to Reproduce
Steps to reproduce the behavior:
import { ViewController } from '@ionic/angular/dist/types/components/nav/view-controller';.ERROR in node_modules/@ionic/angular/dist/types/components/nav/view-controller.d.ts(1,56): error TS2307: Cannot find module '../../interface'import { ViewController } from @ionic/angular, I getExpected Behavior
A clear and concise description of what you expected to happen.
Being able to use ViewController
Additional Context
List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, screenshots, OS if applicable, etc.
I have the same problem as this issue #14749
I think the ViewController is deprecated in v4
What for you would need it? If you need it to close a modal for example, you could use the ModalController instead. Same for PopoverController
this.viewController.dismiss() ===> this.modalController.dismiss()
this.viewController.dismiss() ===> this.popoverController.dismiss()
Thanks it works. I thought you could only dismiss the modal from the component which created the modal.
@peterpeterparker you saved me many times today. V4 is amazing i don t regret switching even in Beta mode :D
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
I think the
ViewControlleris deprecated in v4What for you would need it? If you need it to close a modal for example, you could use the
ModalControllerinstead. Same forPopoverController