Unable to list SMS using cordova plugin in Ionic

I have tried using the plugin provided in the below link

https://github.com/floatinghotpot/cordova-plugin-sms?files=1

I'm getting an error SMS is not defined

Below is my controller 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'
      });
    })
  }
})

Any help will be appreciated