How to Use AngularJS to implement HTML page nesting _ AngularJS

Source: Internet
Author: User
This article mainly introduces how to use AngularJS to implement HTML page nesting, mainly using the ng-include command in AngularJS, for more information, see HTML. HTML pages embedded in HTML pages are not supported. You can use the following methods to implement this function:

  • Use Ajax-Let a server call to obtain the corresponding HTML page and set it in the innerHTML of the HTML control.
  • You can use Web server technologies such as-JSP and PHP on the server to include HTML pages on dynamic pages.

With AngularJS, we can use the ng-include command to embed an HTML page into another HTML page.

Example
TryAngularJS.html

Angular JS uplodesAngularJS Sample Application

Script function studentController ($ scope) {$ scope. student = {firstName: "Mahesh", lastName: "Parashar", fees: 500, subjects: [{name: 'physics ', marks: 70}, {name: 'chemistry ', marks: 80}, {name: 'Math', marks: 65}, {name: 'inc', marks: 75}, {name: 'hindi ', marks: 67}], fullName: function () {var studentObject; studentObject = $ scope. student; return studentObject. firstName + "" + studentObject. lastName ;};} script
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.