title: how to use If condition in ionic popup
body: <p>i created one common Popup screen its used in three module but three module have different title. I didn't give if condition in title, Is possible or not anybody give solution to me.</p>
  
  <p>popup code here :</p>
  
  <pre><code>function showPopup () {
    $scope.data = {};
    var myPopup = $ionicPopup.show({
      template: '&lt;input focus-me type="text" ng-model="data.expensetype" limit-char limit="15"&gt;',
      if (vm.usertype === 'Worker') {
        title: $translate.instant('{{"wtype_message" | translate}}'),
      }
      else if (vm.usertype === 'Buyer') {
        title: $translate.instant('{{"btype_message" | translate}}'),
      }
      else if (vm.usertype === 'Expense') {
        title: $translate.instant('{{"etype_message" | translate}}'),
      }
      scope: $scope,
      buttons: [
       { text: $translate.instant('{{"pcancel_message" | translate}}') },
        {
          text: $translate.instant('{{"psave_message" | translate}}'),
          type: 'button-positive',
          onTap: function (e) {
            if (!$scope.data.expensetype) {
              e.preventDefault();
            } else {
              addExpenseCategory();
              return $scope.data.expensetype;
            }
          }
        },
      ]
    });
    myPopup.then(function (res) {
      $log.log('Tapped!', res);
    });
  }
  </code></pre>