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:

enter image description here

when remove ion-content tag content displayed, not contain scrolling

enter image description here

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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -