angular.js - angular模块config路由时,引入$sce服务出错
世界只因有你
世界只因有你 2017-05-15 16:51:57
0
2
590

$sce在哪个模块里啊
为什么在config路由的时候想注入它出错啊:
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