如何加载HTML代码

时间:2018-07-27 08:41:31

标签: ionic-framework ionic2 ionic3 inappbrowser

如何以离子形式在InAppBrowser中加载html代码。

我已经尝试过了

var url =“ /assets/thanks.html”;       var target =“ _ self”;

  let browser = new InAppBrowser(url, '_self', 'location=no,hidden=no');

  browser.executeScript({code:"<div class=\\\"kg-card-markdown\\\"><div class=\\\"ji-wrapper ver-padding-10\\\">\\n    <ul class=\\\"cust-breadcrumb text-left\\\">\\n    <li class=\\\"breadcrumb-item\\\"><a href=\\\"/\\\">Home</a></li>\\n   <li class=\\\"breadcrumb-item\\\"><a href=\\\"/health-insurance\\\">Health Guide</a></li>\\n <li class=\\\"breadcrumb-item \\\"><a href=\\\"/health-insurance/liberty-general-insurance\\\">Liberty General Insurance</a></li>\\n  <li class=\\\"breadcrumb-item active\\\"><a href=\\\"\\\">Health Value Recharge</a></li>\\n                         </ul>\\n    <div class=\\\"topsection topimg-sec\\\">\\n   <div class=\\\"img-block\\\">\\n   <img src=\\\"https://cdn.insuranceinbox.com/owiproducts/productcompanylogos/libertygeneral.png\\\"/>\\n<div class=\\\"text-center ver-padding-20\\\">\\n    <button class=\\\"jiva-pri-btn\\\" onClick=\\\"location.href='/partners/cellmoney/location'\\\">\\n    Buy Now\\n    </button>\\n    </div>\\n       </div>\\n   <div class=\\\"cont-box\\\">\\n   <h1 class=\\\"comp-heading text-left\\\">Health Value Recharge</h1>\\n   <p class=\\\"p-content\\\"> Liberty's Health Value Recharge, is an exclusively customized health insurance plan available at an affordable cost for individuals and families. This plan aims to provide you with financial support for all expenses related to treatments and hospitalization thus assuring you peace of mind when the health care costs are increasing drastically day by day.</p>  \\n       <div class=\\\"productinsu-con jiva-wrap-spacebetween\\\">\\n                                     <div class=\\\"productinnerinsu\\\">\\n                                         <p class=\\\"insured\\\">\\n                                             Sum Insured\\n                                         </p>\\n                                         <p class=\\\"insured\\\">\\n                                             2,00,000\\n                                         </p>\\n                                     </div>\\n                                     <div class=\\\"productinnerinsu\\\">\\n                                         <p class=\\\"insured\\\">\\n                                             Premium starts from\\n                                         </p>\\n                                         <p class=\\\"insured\\\">\\n                                           2,143\\n                                         </p>\\n                                     </div>\\n                   </div>\\n          </div>\\n                             </div>\\n  <div class=\\\"jiva-layout jiva-wrap-spacebetween ver-padding-20 com-prod-cont\\\">\\n   <div class=\\\"jiva-cus-left-con left-content\\\">\\n    <div class=\\\"stretch-div\\\">\\n  <div class=\\\"ins-trms-bx ver-padding-20\\\">\\n  <h2 class=\\\"text-left sub-title \\\">Key Highlights</h2>\\n  <h3 class=\\\"sub-title ver-padding-10\\\">Cashless Treatment at 8000+ Network Hospitals</h3>\\n <p class=\\\"jiva-def-text text-justify\\\">You don’t have to pay even a single paisa from your own pocket in more than 8000+ network hospitals, for all the treatments that are covered by the policy. The Insurer shall pay for your treatment directly to the hospital, maximum up to your sum insured. </p>\\n   <h3 class=\\\"sub-title ver-padding-10\\\">Hospital Cash</h3>\\n <p class=\\\"jiva-def-text text-justify\\\">In addition to the hospital expenses and medicines, this plan also provides you fixed amount of Rs. 500 per day for every completed day of hospitalization (to a maximum of 10th day of Hospitalization) if the total hospitalization exceeds 3 days.</p>\\n <h3 class=\\\"sub-title ver-padding-10\\\">Expenses before and after Hospitalization</h3>\\n <p class=\\\"jiva-def-text text-justify \\\">You will get covered for all your claim related medical expenses 30 days before your hospitalization and up to 60 days after your discharge. This list may include follow-up visits, medication, diagnosis… etc.,</p>\\n      </div>\\n          <div class=\\\"ins-trms-bx ver-padding-20\\\">\\n<h2 class=\\\"text-left sub-title \\\">Key Product Benefits to Check</h2>\\n  <h3 class=\\\"sub-title ver-padding-10\\\">Room Rent</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">You can avail 1% of your sum insured as room rent per day.</p>\\n <h3 class=\\\"sub-title ver-padding-10\\\">ICU Room Charges</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">Insurance company shall pay up to 2% of your sum insured per day for ICU room charges.</p>\\n<h3 class=\\\"sub-title ver-padding-10\\\">Reimbursement of Ambulance Expenses</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">You can claim upto Rs.1500 per hospitalization - spent on ambulance charges from one Hospital to another Hospital. This would be helpful for advanced/better equipped medical support/aid required for rescuing your health condition.</p>\\n<h3 class=\\\"sub-title ver-padding-10\\\">Day Care Treatments</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">Insurance company will pay for medical treatment costs necessary and reasonable (in scope for a Day Care Procedure) that would require hospitalization for less than 24 hours. (Due to advancement in Technology). Please refer the terms for exact list of procedures.</p> \\n        </div>\\n          <div class=\\\"ins-trms-bx ver-padding-20\\\">\\n<h2 class=\\\"text-left sub-title \\\">Exclusions to note</h2>\\n  <h3 class=\\\"sub-title ver-padding-10\\\">Pre exisiting diseases</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">If you/ any of the insured members are suffering from any medical condition (disease) before taking the policy, then the Insurance company will not pay for treatment of that condition for the first 3 years of subscription. All the other Health Care expenses will be covered.</p>\\n <h3 class=\\\"sub-title ver-padding-10\\\">30 days waiting period</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">You can only claim for treatments of accidental injuries for the first 30 days after taking the policy</p>\\n<h3 class=\\\"sub-title ver-padding-10\\\">1 year waiting period</h3>\\n  <p class=\\\"jiva-def-text text-justify \\\">This policy covers some diseases/treatments like Cataract, Hysterectomy, Kidney Stone, Varicose veins, surgery of Tonsils and sinuses …etc., only after 1 year.</p>\\n        </div>\\n          <div class=\\\"ins-trms-bx ver-padding-20\\\">\\n <h2 class=\\\"text-left sub-title \\\">FAQ’s</h2>\\n  <h3 class=\\\"sub-title ver-padding-10\\\">What are the benefits of having a health insurance policy?</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">Having a health insurance policy covers any expenses you might incur due to hospitalization. This includes in-patient treatments, pre and post hospitalization charges, day care procedures, etc.</p>\\n  <h3 class=\\\"sub-title ver-padding-10\\\">Is there any tax benefit?</h3>\\n  <p class=\\\"jiva-def-text text-justify\\\">Yes, you can avail tax exemptions up to a sum of Rs. 25,000 as tax benefit under 'Section 80D'. In case of senior citizens, you are allowed to avail tax exemption up to a sum of Rs. 30,000 under Section '80'</p>\\n         </div>\\n        <!--<div class=\\\"text-center ji-spacebetween-wrap ver-padding-20\\\">\\n  <button class=\\\"jiva-pri-btn\\\"><a href=\\\"https://cdn.insuranceinbox.com/owiproducts/brochures/OWIHLHL_BROC_CIGNAProHealthProtect.pdf\\\">DOWNLOAD BROCHURE</a></button>\\n            <button class=\\\"jiva-pri-btn\\\"><a href=\\\"https://www.cignattkinsurance.in/sites/default/files/rev_ProHealth_CIS_T%26C_omb_adres%20updated_April2016_final.pdf\\\">CHECK PRODUCT TERMS</a></button>\\n        </div>-->\\n  </div>\\n  </div>\\n   <div class=\\\"jiva-cus-right-con right-content\\\" >\\n       <div class=\\\"position-sticky\\\">\\n  <div class=\\\"shopping\\\">\\n  <h3 class=\\\"title-2\\\">Get Health Value Recharge Now and Protect your Family.</h3>\\n  <button class=\\\"jiva-pri-blk-btn \\\">Coming Soon</button>     \\n   </div>\\n   <div class=\\\"l3-testy\\\">\\n       <h2 class=\\\"text-left sub-title ver-padding-8\\\"> Testimonials</h2>\\n  <p class=\\\"jiva-def-text text-justify ver-padding-10\\\">I have been very impressed with your response. When I think of Insurance Inbox I think of two things easy to use and support when I need it. </p>\\n       <p class=\\\"text-right orgtxt small-text\\\">-- Sai Pramod</p>\\n       <div class=\\\"jiva-cust-divider\\\"></div>\\n       <p class=\\\"jiva-def-text text-justify ver-padding-10\\\">I realized that I must buy health Insurance first and Insurance Inbox provided me the cheapest and easiest way to get insurance in few minutes.</p>\\n       <p class=\\\"text-right orgtxt small-text\\\">-- Ishita Karbelkar</p>\\n       <div class=\\\"jiva-cust-divider\\\"></div>\\n       <p class=\\\"jiva-def-text text-justify ver-padding-10\\\">Insurance Inbox changed my perception towards insurance. It simplified my policy for me , took the stress away and keeps me secured.</p>\\n       <p class=\\\"text-right orgtxt small-text\\\">-- Surya</p>\\n       </div>\\n       </div>\\n                                 </div>    \\n                       </div>\\n           </div></div>"})

1 个答案:

答案 0 :(得分:0)

尝试使用附加函数,即browser.executeScript({code:“ $('Whatever')。append(.controller('TableDataController', function( $rootScope, ... ))”});