Couldn't load template using templateUrl in Angularjs

后端 未结 4 1071
南笙
南笙 2020-12-02 18:32

I am just learning Angularjs, and how to use templateUrl to load a template.

I have a simple directive:

var mainApp = angular.module(\"mainApp\", [])         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 19:22

    Chrome does not allow ajax requests on the file: protocol.

    Take a look at: Google Chrome --allow-file-access-from-files disabled for Chrome Beta 8 for a workaround, or you could run a web server on your computer.

提交回复
热议问题