ionic2

Remove ion item divider

余生长醉 提交于 2020-01-20 17:11:27
问题 How I can remove <ion-item> divider? I have the following code to show 4 items in a row: <ion-row ion-list> <ion-col width-25 *ngFor="let player of players"> <ion-item color="dark"> <ion-avatar item-left> <img [src]="photo" class="img img-circle"/> </ion-avatar> {{user.name}} </ion-item> </ion-col> </ion-row> and the output shows 4 images in a row, as excepted, but each image has a white divider below it. I don't want any divider. I tried to set style="border:none" but it didn't do it. 回答1:

Remove ion item divider

荒凉一梦 提交于 2020-01-20 17:10:28
问题 How I can remove <ion-item> divider? I have the following code to show 4 items in a row: <ion-row ion-list> <ion-col width-25 *ngFor="let player of players"> <ion-item color="dark"> <ion-avatar item-left> <img [src]="photo" class="img img-circle"/> </ion-avatar> {{user.name}} </ion-item> </ion-col> </ion-row> and the output shows 4 images in a row, as excepted, but each image has a white divider below it. I don't want any divider. I tried to set style="border:none" but it didn't do it. 回答1:

Cannot determine the module for class X in X.ts! Add X to the NgModule to fix it error in ionic2

天大地大妈咪最大 提交于 2020-01-20 05:49:51
问题 I am facing an issue when I try to build my app using the following command : ionic cordova run android --prod --release Everything runs fine if I run the command as below: ionic cordova run android The error Iam getting is : Error: Cannot determine the module for class CartItemsPage in C:/test/src/pages/cart/cart-items.ts! Add CartItemsPage to the NgModule to fix it. Cannot determine the module for class ItemsPage in C:/test/src/pages/items/items.ts! Add ItemsPage to th e NgModule to fix it.

Cannot determine the module for class X in X.ts! Add X to the NgModule to fix it error in ionic2

旧街凉风 提交于 2020-01-20 05:49:49
问题 I am facing an issue when I try to build my app using the following command : ionic cordova run android --prod --release Everything runs fine if I run the command as below: ionic cordova run android The error Iam getting is : Error: Cannot determine the module for class CartItemsPage in C:/test/src/pages/cart/cart-items.ts! Add CartItemsPage to the NgModule to fix it. Cannot determine the module for class ItemsPage in C:/test/src/pages/items/items.ts! Add ItemsPage to th e NgModule to fix it.

Ionic: Showing an alert controller with a checkbox and text input

夙愿已清 提交于 2020-01-20 05:10:25
问题 I am trying to show a checkbox along with a text input field. (Ionic 3.5.3) The checkbox is not showing up. I looked at another SO thread for a similar question. The code seems to be the same as what I am doing. The code: let alert = this.alert.create({ title: 'Name your trip', inputs: [ { name: 'name', placeholder: 'Your trip name', }, { name: 'gpsxy', type:'checkbox', checked:true, label:'Log GPS co-ords', value:"true" } ], buttons: [{ text: 'Cancel', role: 'cancel', handler: data => { } },

Ionic: Showing an alert controller with a checkbox and text input

孤者浪人 提交于 2020-01-20 05:09:09
问题 I am trying to show a checkbox along with a text input field. (Ionic 3.5.3) The checkbox is not showing up. I looked at another SO thread for a similar question. The code seems to be the same as what I am doing. The code: let alert = this.alert.create({ title: 'Name your trip', inputs: [ { name: 'name', placeholder: 'Your trip name', }, { name: 'gpsxy', type:'checkbox', checked:true, label:'Log GPS co-ords', value:"true" } ], buttons: [{ text: 'Cancel', role: 'cancel', handler: data => { } },

RxJS/Angular: How to zip observable arrays of objects

僤鯓⒐⒋嵵緔 提交于 2020-01-17 07:33:40
问题 I am working with ionic 2 and angular 2. Right now I have two observables that contain object arrays and are being passed to my template to be displayed: users: Observable<User[]>; scores: Observable<Score[]>; In my template I currently have to display them separately: <ion-card *ngFor="let score of scores | async" > <ion-item text-wrap>{{ score.total }} </ion-item> </ion-card> <ion-card *ngFor="let user of users | async" (click)="goToPlayer(user, league)"> <ion-item text-wrap>{{ user.id }}<

How to get ion-select text

醉酒当歌 提交于 2020-01-17 07:27:28
问题 I am trying to get the ion-select option's text. Here is my object structure { "data": [ { "id": "203", "bench": "abc" }, { "id": "205", "bench": "def" }, { "id": "207", "bench": "ghi" } ]} Here is my HTML <ion-select name="bench" formControlName="bench"> <ion-option *ngFor="let b of benchList" value="{{b.id}}">{{b.bench}}</ion-option> </ion-select> How could i get the 'b.bench' . I need both id and bench. I got the id by using value attribute but I can't find a way to get bench value. Please

multiple executions of page constructor using navParams

给你一囗甜甜゛ 提交于 2020-01-17 06:40:13
问题 I need to search customers and items from add-invoice page.For that I have created two separate pages call customer-search and item-search.When I search the customer I have to go to the customer-search page and come back to the add-invoice page with customer detail.After that in the same same way I have to go to the item-search page multiple times for get multiple items and come back to the add-invoice page with items details. To do that task,I'm passing navParams from the two pages to add

ionic 2 SQLite manage callback with Promise

白昼怎懂夜的黑 提交于 2020-01-17 05:53:33
问题 I want to get the callback of a successful SQLite transaction with Ionic 2. I am still currently learning the HTML5 Promise, and it is still a bit confuse. And since I've heavily used jQuery Deferred before, I try to adapt what I used to do with jQuery. Before Ionic 2, I used the following jQuery pattern to execute my async SQL: var SqlResult = function(sqlToExecute,bracketValues){ this.sqlToExecute = sqlToExecute; this.bracketValues =bracketValues; }; SqlResult.prototype