ionic framework - Ionic2 ion-content not render content -
i try using ion-content as:
<ion-content> <ion-list> <button ion-item *ngfor="let item of items" (click)="itemtapped($event, item)" class="list-item"> <img class="picture" src="/build/images/profile/{{item.picture}}" item-left/> <div class="item-data"> <div> <span class="title">{{item.title}}</span> <span class="sub-title">{{item.typework}}</span> <span class="distance"><ion-icon name="map" item-right></ion-icon>{{item.distance}} km</span> </div> <div class="evaluation"> <span><ion-icon name="cash"></ion-icon>{{item.noteaverageprice}}</span> <span><ion-icon name="ribbon"></ion-icon>{{item.noteaverageservice}}</span> <span><ion-icon name="clock"></ion-icon>{{item.noteaveragescore}}</span> </div> </div> <!-- <span class="description">{{item.description}}</span> --> </button> </ion-list> <div *ngif="selecteditem" padding> navigated here <b>{{selecteditem.title}}</b> </div> </ion-content>
and not render content:
when remove ion-content tag content displayed, not contain scrolling
i found problem, used in controller of class view (with ion-content) @component instead of @page. after change @page works me.
before
import {component, viewchild} '@angular/core'; import {navcontroller, alert, content} 'ionic-angular'; import {professionalmodel} './professional-model'; @component({ templateurl: 'build/pages/professional/professional-view.html' })
after
import {viewchild} '@angular/core'; import {navcontroller, alert, content, page} 'ionic-angular'; import {professionalmodel} './professional-model'; @page({ templateurl: 'build/pages/professional/professional-view.html' })
Comments
Post a Comment