Q:

var vm = this, making $http request twice

Here is my controller code:
.controller('TransitCtrl', function ($ionicPlatform, $scope, $state, $q, $ionicSideMenuDelegate, $timeout, $http, design, config) {
    $ionicSideMenuDelegate.canDragContent(false);
    var vm = this;
    vm.userImg = design.user_img;

    vm.isGetStarted = false;
    vm.getPV = true;
    vm.getPL = false;
    vm.showWelcome = false;
    var counter = 1;
    $ionicPlatform.ready(function(){  
        $timeout( function(){
             var userDataStageFirst = {
              url: config.baseURL + 'userDataStageFirst',
              dataServer: {
                serverTaskRequest: counter
              }
            }
            var url = userDataStageFirst.url;
            var dataServer = userDataStageFirst.dataServer;
            $http.post(url, dataServer).success(function (data, status, headers, config) {
                alert(data)
              })
              .error(function () {
                alert("error");
              });
        }, 1000 ); 
     });
  })

And here is this app.js
.state('app.transit', {
      url: '/transit',
      views: {
        'menuContent': {
          templateUrl: 'templates/transit.html',
          controller: 'TransitCtrl'
        }
      }
    })

and My html page
<ion-view hide-nav-bar="true" ng-controller="TransitCtrl as vm">
  <ion-content>
      hello world
  </ion-content>
</ion-view>

When I use $scope in place of vm its working perfectly good, but when I use vm, it sends 2 $http request to the server.  Not being able to understand this concept here. 

A:

Try remove ng-controller="TransitCtrl as vm" from template. 
and change to this
state('app.transit', {
  url: '/transit',
  views: {
    'menuContent': {
      templateUrl: 'templates/transit.html',
      controller: 'TransitCtrl as vm'
    }
  }
})

