Where to import PopoverController from?

Pls am trying to implement a popover in one of my ionic 2 app, I have followed the steps of the documentation http://ionicframework.com/docs/v2/api/components/popover/PopoverController/ but the issue am having is that the documentation did not show how to import The PopoverController to the typescript file and that is causing errors when I run the app. Please do you know where I can import the PopoverController from?

I think the documentation is outdated. I found this by referring to the code in node_modules/ionic-angular/components/popover. It’s working for me.

import {NavController, Popover} from 'ionic-angular';


let popover = Popover.create(PopoverPage);
this.navController.present(popover, {
  ev: $event

Ok thank you very much, i will try that now…

The documentation is pointing to the nightly version which uses the latest code. It refers to the master branch of ionic: https://github.com/driftyco/ionic

In the top left you’ll see a dropdown that says 2.0.0-nightly:


If you change this to 2.0.0-beta.10 (latest) you’ll see the documentation for the latest stable release: http://ionicframework.com/docs/v2/2.0.0-beta.10/api/

We have an open issue to default this dropdown to the latest stable release:

Thank you very much, i have been able to implement it and it is working fine…

I am also facing the same problem. I need to use PopoverController rather than Popover component because it has functions like onWillDismiss and onDidDismiss. I am unable to import PopoverController. Both latest and nightly version documents showing PopoverController.

From beta.11 release all Overlay components to be presented by their controller instead of NavController i.e. instead of Popover ionic using PopoverController.

import the PopoverController from ionic-angular

import { NavController, PopoverController, ViewController } from ‘ionic-angular’;

Thanks for reply. I know how to import, but it is not showing in my library(app.bundle.js). my ionic version is 2.0.0-beta.37.

Please take a look at the steps to upgrade to Beta 11 in the changelog: https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#steps-to-upgrade-to-beta-11

The version 2.0.0-beta.37 refers to the version of the Ionic CLI, not the framework. Also, version 2 of the CLI is out now. You can install this by running:

npm install -g ionic

and when you run ionic -v from the command line it should give you:

$ ionic -v

Running ionic info from within your project folder will give you the Framework version:

Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.0.0

Let me know if any of this doesn’t make sense. Thanks! :slight_smile:

Besides Ionic Framework version and Ionic CLI Version, ionic info shows also Ionic App Lib version. In my installation it’s 2.0.0-beta.20. Is it the latest one? And what is Ionic App Lib? Thanks.

Hi Brandy,

Where can I check the most recent stable release for ionic 2? Sometimes I am unsure if I am working with the most stable release or not.


Ionic App Lib is used by the CLI. The latest version of it is the same as the CLI, 2.0.0, but it gets updated when you update the CLI. For example, if you are using the latest beta release 2.0.0-beta.37 of the CLI it will install Ionic App Lib v2.0.0-beta.20. Installing the latest version of the CLI by running npm install -g ionic will give you 2.0.0 for both the CLI and App Lib Version.

You can see the project itself here: https://github.com/driftyco/ionic-app-lib and the latest version here: https://www.npmjs.com/package/ionic-app-lib

Hi! You can check the latest stable version of Ionic Framework v2 here: https://www.npmjs.com/package/ionic-angular

This gets updated automatically when we release. We also update the changelog for every release with steps to upgrade any any changes between versions: https://github.com/driftyco/ionic/blob/master/CHANGELOG.md

I recommend reading through the changelog every time you update to a new version. :slight_smile:

If you’re interested in using nightly releases (not stable), you can run npm view ionic-angular from the command line to see all of the versions including the latest nightly versions. For example, these are all of the versions since the Beta 11 release (as of right now):

'2.0.0-beta.11': '2016-08-05T15:32:56.386Z',
'2.0.0-beta.11-201608092109': '2016-08-09T21:09:14.594Z',
'2.0.0-beta.11-201608162233': '2016-08-16T22:33:29.815Z',
'2.0.0-beta.11-201608232236': '2016-08-23T22:36:10.693Z'

And if you’d just like to install the latest nightly, please see these steps: https://github.com/driftyco/ionic/tree/master/scripts#installing-nightly-version

Please let me know if you have questions, thanks!

Hi Brandy, I installed the latest version of CLI by running npm install -g ionic per your suggestion. My CLI version now is 2.0.0, while Ionic App Lib Version is 2.0.0-beta.20. What am I doing wrong? Thanks.

Hmm could you try uninstalling and reinstalling ionic?

npm uninstall -g ionic
npm install -g ionic

If you are still having issues please open an issue on the CLI repository: https://github.com/driftyco/ionic-cli/issues

Thanks :slight_smile:

This is not possible to browse docs in version 10. Even if I select version in the dropdown, when I click component in the left sidebar, I’m redirected to the latest version of the docs.

Thanks for letting me know! I created an issue for this on the ionic-site repo:

I know it’s an inconvenience but in the meantime you can navigate to the documentation for beta.9 and change the 9 to a 10 in the URL. Sorry! :slight_smile:

Thanks for fast response. Yep, I’m navigating through the docs this way right now, so no worries!