0

I have my app.config this way.

angular.module('App')
.config(function (blockUIConfig) {
   blockUIConfig.autoInjectBodyBlock = false;
   blockUIConfig.templateUrl = 'assets/bower_components/angular-block-ui/src/angular-block-ui/recibo_preview.html';
   blockUIConfig.autoBlock = false;
});

But I need blockUIConfig.templateUrl to be dynamic, more or less like this.

angular.module('App')
.config(function (blockUIConfig,$rootScope) {
   blockUIConfig.autoInjectBodyBlock = false;
   blockUIConfig.templateUrl = 'assets/bower_components/angular-block-ui/src/angular-block-ui/'+$rootScope.file;
   blockUIConfig.autoBlock = false;
});

Is there any way to associate a $ rootScope variable?

3
  • Example you can provide Commented Nov 29, 2016 at 15:48
  • Take a look at this answer: stackoverflow.com/a/25824437/1172730 Commented Nov 29, 2016 at 15:54
  • I have not worked the previous example take into account that the injectable blockUIConfig is a constant. Commented Nov 29, 2016 at 16:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.