This article mainly introduces the angularjs ng-include directive.Here is the basic knowledge of ng-include.And attached code examples,Have
angularjs ng-include directive
Include html file:
<! Doctype html> <html> <head> <meta charset="utf-8"> <script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script> </head> <body ng-app=""> <div ng-include="" myfile.htm ""></div> </body> </html>
myfile.htm file title
This text comes from the included file myfile.htm!
Definition and usage
The ng-include directive is used to include external html files.
The contained content will be the children of the specified element.
The value of the ng-include attribute can be an expression,Returns a file name.
by default,The included files need to be included under the same domain name.
<element ng-include="filename" onload="expression" autoscroll="expression"></element>
The ng-include directive is used as an element:
<ng-include src="filename" onload="expression" autoscroll="expression"></ng-include>
All html elements support this directive.
|filename||File name. You can use an expression to return the file name.|
|onload||Optional, the expression to be executed after the file is loaded.|
|autoscroll||Optional, whether the contained part is scrollable on the specified view.|
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- python - you may need to restart the kernel to use updated packages error
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- python 3x - typeerror: 'method' object is not subscriptable
- xcode - pod install [!] no `podfile 'found in the project directory
- i want to call a child component method from a parent in vuejs
- vuejs - [vuetify] unable to locate target [data-app] i want to unit test to avoid warning