Consider the code (Angular 1.2 RC3):
main.config(['$routeProvider', '$sce', function($routeProvider, $sce) { $routeProvider.when('/', { templateUrl: $sce.trustAsResourceUrl('bla-bla.html'), controller: "App.Controllers.BlaBla" }); $routeProvider.otherwise({ redirectTo: '/' }); }]);
It throws an exception because services are not allowed during configuration, and I use the $ sce (Strict Contextual Escaping) service here.
How to use SCE in the "config" method? What are the possible solutions to this problem?
angularjs
vencedor
source share