Encountering an issue while trying to configure my angularjs + typescript
application with the restangular
plugin
Here are the steps I have taken:
Ran
bower install --save restangular
(now I have in index.html
)<script src="bower_components/restangular/dist/restangular.js"></script>
Added
restangular
to app dependenciesangular.module('myapp', [ 'ngAnimate', 'ngCookies', 'ngResource', 'ngRoute', 'ngSanitize', 'ngTouch', 'restangular' ])
- Installed typings for restangular
- Currently attempting to set up restangular:
/// <reference path="../../typings/restangular/restangular.d.ts" /> ... angular.module('myapp').config(($restangularProvider:restangular.IProvider) => { $restangularProvider.setBaseUrl("http://localhost:1337/"); });
The issue arises when my browser throws an error due to being unable to resolve the dependency of $restangularProvider
.
What could be the mistake I am making? Have I overlooked something?
Thank you