Is it possible to fetch templates from $templateCache when configuring my $routeProvider?

前端 未结 3 1986
别那么骄傲
别那么骄傲 2021-02-13 16:32

My intention is to load all the templates of my web app with one single call to an external JSON file containing a list of all the template names and values.

I am curren

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-13 17:39

    This Fiddle is what you need.

    Basically - you can just put the $templateCache key in the templateUrl: property value inside the $routeProvider configuration.

提交回复
热议问题