All we need is an easy explanation of the problem, so here it is.
My angular project’s path is like this
web server.py ##flask server program app static app.js controllers.js etc... templates index.html home.html
<!-- this didn't work --> <ng-include src="templates/home.html"><ng-include> <!-- nor did this --> <ng-include src="home.html"></ng-include>
<h1> home! </h1>
Except I don’t see the partial (home.html) in my output.
Anyone see my mistake?
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
The src attribute of ng-include expects a string. Either you pass a scope variable, or pass string directly.
<ng-include src=" 'templates/home.html' "></ng-include>
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂