Correct way to load ngresource

Hello,
I need to use in my ionic project ngresource

I have added to the file services.js
angular.module ('starter.services', ['ngResource'])

but I get the error
Failed to instantiate module ngResource to two: Error: [$ injector: nomod] Module 'ngResource' is not available!

then I added to the index.html file
<script src = "lib / ionic / js / angular / angular-resource.js"> </ script>

and it works.

But is this the right way to load ngresource in ionic?

yep ngResource is an optional module and not required by ionic. so you need to load it in your index.html and load it