如何添加HTML code动态地离子含量? [英] How to add Html code dynamically to ion-content?
本文介绍了如何添加HTML code动态地离子含量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我和离子跨平台的工作,我想动态增加内离子含量的HTML code和谢谢你。
解决方案
<离子查看查看标题=管理仪表板>
<离子导航栏类=酒吧酒吧头球冲顶所有>
<离子NAV-按键侧=左>
< /离子NAV-按钮>
< /离子导航栏>
<离子含量>
< DIV CLASS =一些CSS>
< DIV CLASS =一些CSSNG-包括=newPage.url> < / DIV>
< / DIV>
< / DIV>
< /离子含量>
$ scope.ratingView = {[
名称:'模板/ ZZZ / ZZZZ-ratings.html',
网址:'模板/ ZZZ / ZZZZ-ratings.html
}];
$ scope.newPage = $ scope.ratingView [0];
以上code,显示,创建动态添加HTML页面,如果你想从控制器侧添加HTML简单地创建使用JavaScript控制端模板。
I'm working with ionic cross platform and I want to add dynamically a html code inside ion-content and thank you.
解决方案
<ion-view view-title="Admin-DashBoard">
<ion-nav-bar class="bar bar-header header-all">
<ion-nav-buttons side="left">
</ion-nav-buttons>
</ion-nav-bar>
<ion-content>
<div class="some css">
<div class="some css" ng-include="newPage.url"> </div>
</div>
</div>
</ion-content>
$scope.ratingView = [{
name: 'templates/zzz/zzzz-ratings.html',
url: 'templates/zzz/zzzz-ratings.html'
}];
$scope.newPage = $scope.ratingView[0];
Above code that show , you create add dynamically html page , if you want add html from controller side simply create controller side template with javaScript.
这篇关于如何添加HTML code动态地离子含量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文