ionic 3中意外的结束标记离子列表 [英] Unexpected closing tag ion-list in ionic 3
本文介绍了ionic 3中意外的结束标记离子列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我检查了很多次,没有发现任何问题.对于HTML内的ion-list的结束标记,它会引发错误.
I checked many times and didn't see any problem. It throws an error for a closing tag of ion-list inside HTML.
组件
<div>
<button (click)="toggleFunc();" class="accordion">Section Title</button>
<div class="panel" [ngClass]="opened ? 'active' : ''">
<form [formGroup]="form">
<ion-list style="margin-top: 15% !important" class="scroll">
<ion-item>
<ion-input class="input-field" formControlName="firstName" name="firstName" type="text" placeholder="First Name"></ion-input>
</ion-item>
...
...
<button ion-button block class="login-button" (click)="search(form.value)">Search</button>
</ion-list>
</form>
</div>
</div>
页面
<ion-content>
<app-search></app-search>
<div class="group">
<ion-grid>
...
</ion-grid>
</div>
</ion-content>
问题来自搜索组件的HTML.怎么了?以及如何解决?
Problem is coming from search component's HTML. What is wrong? And how can be it fixed?
推荐答案
我不确定到底是什么问题.实际上,您在上面提供了两个模板. 我创建了一个小演示,我认为它完全可以代表您的期望.在这里看看;)
I am not sure what exactly the problem is. De facto, you provide two templates above. I created a small demo which I think represents exactly what you are looking for. Take a look at it here ;)
https://stackblitz.com/edit/ionic-accordion
如果有帮助,请不要忘记投票. 干杯!
Do not forget to upvote if it helps. Cheers!
这篇关于ionic 3中意外的结束标记离子列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文