Including files in an AngularJS App
September 14, 2015
Including a standard header or other component in Angular is pretty simple. Just use
ng-include and you're all set.
Simply use the ng-include attribute directly in any element and your include file will plop right in. Inside the quotes, point to the location of your file that your including. The trickiest part is that you need to include single quotes inside the double quotes. This ensures that Angular doesn’t evaluate what you have inside the quotes as an expression. Instead, it will go get that file path and include that file in your view.
Also, you can use includes as an html tag as well and it would look something like this.
And, like most Angular directives you can also use this one as a class.