title: Pressing enter to submit in Ionic Popup with AngularJs
body: <p>I have a popup in ionic and have one textfield and one button in it. I want to press enter and want button to work and close the popup. Im wondering how to perform this action within this popup below.</p>
  
  <pre><code>var myPopup = $ionicPopup.show({
              template: '&lt;input type = "text" ng-model = "data.model"&gt;&lt;br&gt; '
              , title: 'Name'
              , scope: $scope
              , buttons: [
                  {
                      text: 'Cancel'
                  }, {
                      text: '&lt;b&gt;Search&lt;/b&gt;'
                      , type: 'button-positive'
                      , onTap: function (e) {
                          $ionicLoading.show();
                          $http.get(HTTPService.getHttpText() + 'Persons/' + $scope.data.model).then(function (resp) {
                              console.log('Success', resp);
                              $ionicLoading.hide();
                          }, function (err) {
                              $ionicLoading.hide();
                              console.error('ERR', err);
                              // err.status will contain the status code
                          })
                      }
                      }
                  ]
          });
  </code></pre>