Ionic the data returned in the background is an HTML template, the method of parsing the HTML file:

Source: Internet
Author: User

1. The data format returned in the background is:

{
"State": "100",
"Data": [
{"Content":
"\u003c! DOCTYPE HTML public \ "-//W3C//DTD XHTML 1.0 transitional//en\" \ "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd\ "\u003e\r\n\u003chtml xmlns=\" http://www.w3.org/1999/xhtml\ "\u003e
\r\n\t\u003c head\u003e
\r\n\t\t\u003cmeta
Http-equiv=\ "Content-type\"
Content=\ "text/html;
Charset=utf-8\ "/\u003e\u003ctitle\u003e\r\n\t\t\u003c/title\u003e\r\n\t\t
\u003cstyle type=\ "Text/css\" \u003e
\r\n\t\t\t
. cs8f032eb9{text-align:left;text-indent:18pt;margin:0pt 0pt 0pt 0pt;line-height:16.2pt}
\r\n\t\t\t
. Cs31b0b66d{color: #4A472F; Background-color: #FFFFFF; font-family: Microsoft Jacob Black; font-size:9pt;font-weight:normal; Font-style:normal;}
\r\n\t\t\t
. cs2654ae3a{text-align:left;text-indent:0pt;margin:0pt 0pt 0pt 0PT}
\r\n\t\t\t
. Csc8f6d76{color: #000000; background-color:transparent;font-family:calibri;font-size:11pt;font-weight:normal; Font-style:normal;}
\r\n\t\t\u003c/style\u003e
\r\n\t\u003c/head\u003e
\r\n\t\u003c
BODY\U003E\R\N\T\T\U003CP class=\ "cs8f032eb9\" \u003e\u003cspan class=\ "cs31b0b66d\" \U003E\U0026NBSP; The first article is to further standardize the management of vehicle safety in the Department of Culture, to ensure the safety of traffic and to establish this system in conjunction with the actual system of Culture Hall. \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; The second Culture Hall system vehicle safety Management implements the \u0026ldquo; who owns, who is responsible for \u0026rdquo; and the method of grading management, each unit manages the vehicle of its own units. \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; The third unit should establish the vehicle safety management system, determine the person responsible for the vehicle management, do a regular vehicle maintenance, maintenance and safety education work of the driver. \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; The fourth article implements the holiday vehicle storage System. During the holidays, all units except for work need to retain the official car, all other vehicles sealed. \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; Fifth the district-level cultural units in the Urumqi district are strictly forbidden to go out during the holidays, special circumstances do need to go out of Urumqi city, must be approved by the main leadership of the cultural hall before the city. If unauthorized out of the city without permission, the main leadership of the Unit and the responsibility of the relevant management personnel, causing security accidents or economic losses, will be subject to disciplinary action in accordance with the relevant provisions. \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; The sixth article implements the strict vehicle dispatch system. All units should be combined with the actual, to establish a specific vehicle dispatching system, so that every car must perform the dispatch formalities, prohibit bus private. All the consequences caused by the private bus are the responsibility of the Unit leader, the vehicle management and the driving personnel. \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; Seventh driver safety Driving standard \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; (a) Motorists should always observe and check various instruments and alarm devices, smell by smelling, and identify the oil circuit, circuits, transmission, clutch device fault, found that abnormal phenomenon should be promptly excluded orProcessing. \u003cbr/\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp; (Two "}]}

2. Remove the HTML file:

$scope. content= $sce. trustashtml (Data[0]. Content);

3. On the Templates page:

<style= "WIDTH:80%;MARGIN:AUTO;TEXT-INDENT:2REM;LINE-HEIGHT:2REM;" ng-bind-html = "Content" ></ P >

Ionic the data returned in the background is an HTML template, the method of parsing the HTML file:

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.