title: Unable to list SMS using cordova plugin in Ionic
body: <p>I have tried using the plugin provided in the below link</p>
  
  <p><a href="https://github.com/floatinghotpot/cordova-plugin-sms?files=1" rel="nofollow">https://github.com/floatinghotpot/cordova-plugin-sms?files=1</a></p>
  
  <p>I'm getting an error SMS is not defined</p>
  
  <p>Below is my controller code </p>
  
  <pre><code>angular.module('starter.controllers', [])
    .controller('SMSCtrl', function($scope ,$ionicPopup ) {
      $scope.data = {};
      $scope.SMSlist = function() {
        console.log("Button click");
        var filter = {
          box : 'inbox', //inbox, sent, draft
          //following 4 filters should not be applied together, they are OR relationship
          read :1, //0 for unread and 1 for already
          // _id: 1234, //specify the msg id
          // body : 'This is a test SMS' , //content to match
          // address: '+9731151243';
  
          indexFrom : 0,
          maxCount : 10,
  
        };   
        if(SMS) SMS.listSMS(filter,function(data){
          if(Array.isArray(data)){
            var sms = data[i];
            console.log(sms);
            $scope.article = sms;
        }
      }, function(err) {
        var alertPopup = $ionicPopup.alert({
          title: 'Reading Failed!',
          template: 'Read Failed'
        });
      })
    }
  })
  </code></pre>
  
  <p>Any help will be appreciated</p>