templateUrl无法正常工作?导致cors错误

时间:2020-06-30 06:44:30

标签: angular

// templateUrl导致cors错误。请告诉我解决方案。

  app.config(function($routeProvider)
                {
                    $routeProvider
                    .when("/result",{
                     //template is work fine,but templateUrl leads to cors error
                        template:"<h1>{{name}}</h1>",
                        controller:"cn2"
    
                    })
                });

0 个答案:

没有答案