HTML template not found [duplicate]

落花浮王杯 提交于 2019-12-02 02:20:58

The templates folder is for template files that will be rendered by Jinja from Flask. They are not served as normal static html files that would be accessible to Angular. Move the Angular templates to the static folder and access them from there. You can generate the urls with url_for if you're rendering the Angular routing code in a Jinja template.

templateUrl: '{{ url_for('static', filename='angular_templates/home.html') }}'
// or if the Angular is complete separate from Flask/Jinja,
// you'll have to just write out the path
templateUrl: 'static/angular_templates/home.html',

Check if the router is accessing the right pages. You can do this in Chrome via the developer console, then the Network tab.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!