Discussions

Ask a Question
Back to All

How access module configuration

If you inject a module with ocLazyload, how to setup a configuration provider on this new module?

I try to inject a loopback angular module
https://docs.strongloop.com/display/public/LB/AngularJS+JavaScript+SDK

I need to access the LoopBackResourceProvider

angular.module('my-app-module')config(function(LoopBackResourceProvider) {

// Use a custom auth header instead of the default 'Authorization'
LoopBackResourceProvider.setAuthHeader('X-Access-Token');

// Change the URL where to access the LoopBack REST API server
LoopBackResourceProvider.setUrlBase('http://api.example.com/');

Is it possible?