angularjs Error: [$compile:tpload] Failed to load template

前端 未结 4 790
谎友^
谎友^ 2021-01-05 02:50

I am trying to build simple routing app in angularjs. I have main index.html page with ng-view div and javascript code for routing. Also 2 simple html pages view2.html and v

4条回答
  •  臣服心动
    2021-01-05 03:07

    I had the same error, in my case the web server was written with node js and the uri to get views that were in the specified path with $stateProvider was not created, since for each view/template that is wanted to display an http request of type Xhr GET is made.

    As the uri did not exist I obtained a 404 code and this made the browser got into callback that killed him. Make sure your server is returning the requested view. (Translated with google translate)

提交回复
热议问题