Getting version id of application

how to access the name and version id of app from controller and can we access the package.json file ???

Hi @sajith,

I’m using the following plugin in my applications:

With the plugin installed, put the following in your $ionicPlatform.ready function:

cordova.getAppVersion(function(version) {
    appVersion = version;

Of course make sure that appVersion is a global variable so that way you can access it from any controller. This will find the version you put into your config.xml file.


and one more thing slidebox pager can not work properly if we add new slides after onchange function
There are more ‘dots’ shown on the advert carousel then there are images and though it may seem logical to swipe right to see them you are returned to the first dot - in the example there are 3 images but 5 dots and you cant get to dot 4 or dot 5!

<ion-nav-buttons side="left">
    <button class="button button-icon button-clear ion-navicon" ng-click="showMenu()">
<ion-nav-buttons side="right">

    <select class="ion-input-select " ng-model="location" 
            ng-options=" for loc in options" ng-change="change(location)" ></select>


<ion-content > 
    <ion-refresher on-refresh="doRefresh()"
                 pulling-text="Pull to refresh..."
        does-continue="true" scroll="true" 

        <ion-slide  class="item-icon-left item-icon-right" ng-repeat="slide in slides" >
            <i class="icon ion-chevron-left" ng-click="previous()" ng-if="slideIndex !=4  " ></i>
            <div  id="logo" >
                <a href="#/tab/offers/{{}}" >
                <img class="full-image" ng-src="{{slide.image}}" >
            <i class="icon ion-chevron-right" ng-click="next()" ng-if="slideIndex != 4"></i>

    <div class="list ">
        <a ng-repeat="list in lists" class="item item-avatar-left item-icon-right" href="#/tab/offers/{{}}">
            <img  ng-src="{{list.image}}">
            <div class="row">
                <div class="col-66">
                <span class=" item-note">
                    <i class="icon ion-chevron-right"></i>