TutorialLesson 22Free preview
AngularJS Includes
This lesson is part of AngularJS · All levels
Summary
The ng-include directive allows you to insert another HTML file into a page, so that parts like header or footer do not need to be rewritten. The src value can be either a static string or a scope expression. Since the content is loaded by request, make sure the file path is correct so that error 404 does not appear.
Key points
- Ng-include inserting external HTML files into the page
- The src value can be either a static string or a model expression
- Suitable for reusable header, footer, or partial
- Make sure the file path is correct so that it's not 404
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.