angular.js - When config routing in the angular module, an error occurred when introducing the $sce service
世界只因有你
世界只因有你 2017-05-15 16:51:57
0
2
630

Which module is $sce in?
Why is there an error when trying to inject it when config routing:
Uncaught Error: [$injector:modulerr]

angular.module('marketing-module',['ngRoute','d3','ngSanitize'])
    .config(['$routeProvider','$sce',function($routeProvider,$sce){
        $routeProvider
            .when('/',{
                ...
            })
            ...;
 }]);
世界只因有你
世界只因有你

reply all(2)
迷茫

Only things like constant provider can be injected into config, but service cannot be injected

给我你的怀抱

Solved it myself. Services cannot be introduced here, only service providers

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template