So persons and items are independent sets of data. Can you explain what you are trying to do with items and persons?
Opening pages with ngFor
Unique data from JSON responce
[{“msgFrom”:“XXXXXX”,“msgTo”:“YYYYYYY”,“msg”:“Something”,“room”:“Good Morning”,“seen”:“0”,“createdOn”:“2019-07-03T15:29:47.615Z”,"__v":0},{“msgFrom”:“subbareddya@sathguru.com”,“msgTo”:“ashokm@sathguru.com”,“msg”:“Accepted 1000”,“room”:“HRMS”,“seen”:“0”,“createdOn”:“2019-07-02T11:23:00.766Z”,"__v":0},{msgFrom":“AAAAAAA”,“msgTo”:“BBBBBBB”,“msg”:“Meeting is scheduled “,“room”:“Good AfterNoon”,“seen”:“0”,“createdOn”:“2019-07-02T11:15:49.484Z”,”__v”:0},
{“msgFrom”:“CCCCCC”,“msgTo”:“YYYYYYY”,“msg”:“Something”,“room”:“Good Morning”,“seen”:“0”,“createdOn”:“2019-07-03T15:29:47.615Z”,"__v":0},{“msgFrom”:“subbareddya@sathguru.com”,“msgTo”:“ashokm@sathguru.com”,“msg”:“Accepted 1000”,“room”:“HRMS”,“seen”:“0”,“createdOn”:“2019-07-02T11:23:00.766Z”,"__v":0},{msgFrom":“AAAAAAA”,“msgTo”:“DDDDDDD”,“msg”:“Meeting is scheduled “,“room”:“Good AfterNoon”,“seen”:“0”,“createdOn”:“2019-07-02T11:15:49.484Z”,”__v”:0},
{“msgFrom”:“YYYYYY”,“msgTo”:“AAAAAAA”,“msg”:“Something”,“room”:“Good Morning”,“seen”:“0”,“createdOn”:“2019-07-03T15:29:47.615Z”,"__v":0},{“msgFrom”:“subbareddya@sathguru.com”,“msgTo”:“ashokm@sathguru.com”,“msg”:“Accepted 1000”,“room”:“HRMS”,“seen”:“0”,“createdOn”:“2019-07-02T11:23:00.766Z”,"__v":0},{msgFrom":“BBBBBBB”,“msgTo”:“XXXXXXXX”,“msg”:“Meeting is scheduled “,“room”:“Good AfterNoon”,“seen”:“0”,“createdOn”:“2019-07-02T11:15:49.484Z”,”__v”:0}
]
From above responce, I need only “msgFrom” and “msgTo” data that also unique data should get, so please help me out. Thank You.
Get data from one page and display on another page using viewCtrl.dismiss();
In Selector.ts
this.ViewCtrl.onDidDismiss(data=>{
this.navCtrl.push(‘hompage’,data:data)
})
IN home.ts
let data=this.navParams.get(data);
Try this.
Open specific page on notification
anyone tried with deeplinks ?
How to search using @ and # tags in input?
Hello, I am making a post similar to a Facebook post, when I post data in the post when I type “@” to search data that return users names and if I type “#” first to call API and return available tags in ionic 4.
Here what I have done:
page.html
<ion-item>
<ion-textarea rows="3" (ionInput)="searchPeople($event)" cols="20" formControlName="comment"
placeholder="Tweet your reply" spellcheck="true" autoComplete="true" autocorrect="true" autofocus required>
</ion-textarea>
</ion-item>
page.ts
searchPeople(ev: any) {
// set val to the value of the searchbar
let val = ev.target.value;
let firstchar = val.charAt(0);
if (firstchar = "@") {
console.log("search people");
}
else if (firstchar = "#") {
console.log("hash tag");
} else {
console.log("error");
}
}
I did like this but it’s not working…
Get data from one page and display on another page using viewCtrl.dismiss();
Upon using the code i get data as undefined. My home page is a wizard page with 3 steps and i am calling the select page from wizard step 2 so i want the data to return to home page directly to step 2.
Ionic 3 Push Notification
Hi! May I know if which of these did you try? My database is mySQL too, but my push notifs is from firebase. May I know how you connected the two? Thanks
Opening pages with ngFor
people is my json array which ı want to display in the page. Item is my page array which ı want to push for each person. But every person go to same page . I want to push different pages. please help me.
Opening pages with ngFor
Do you want to display the list of people on the home page? and then when u click on a person name, which page should it navigate to?
If you are looking to use nested ngFor loops, you need to first workout on how to loop over items and persons first. Then you could use ion-list and ion-item and do something like this
<ion-list *ngFor=“let person of people”>
{{person.lesson_d.name}}
<ion-item *ngFor="let item of items” (click)="“openPage(item)">
{{person.lesson_d.name}} {{item.component}}
</ion-item>
</ion-list>
Livereload ERR_CLEARTEXT_NOT_PERMITTED
same problem any solutions ??
Need to develop an application for food delivery
I would like to know more about the work and the project,
For further discussion, you can add on on skype live:lauren_8606 or can mail me on lauren.c@talenetsfromindia.com
I will look forward to hearing from you soon and have a long term business relationship with you.
Thanks
Regards
Shubhangi/lauren
live:lauren_8606
T - +13474746849
Opening pages with ngFor
I solved my problem like this.
<ion-col col *ngFor=“let person of people; let i=index” >
{{person.lesson_d.name}}
thank you for your answer
Get data from one page and display on another page using viewCtrl.dismiss();
Can you try with this
StackBlitz/Plunker/CodePen template for Ionic 4.5.0 + Angular
Does anyone have a StackBlitz/Plunker/CodePen template for Ionic 4.5.0 + Angular? I’m having a hard time trying to find one.
Readdir() of /Data not working?
I am trying to get a list of all files in the FilesystemDirectory.Data filesystem. Here is my code:
export const removeAllDataFiles = () => {
return Filesystem.readdir({
path: '',
directory: FilesystemDirectory.Data,
});
};
I get an error back: Error: Uncaught (in promise): Error: Folder does not exist.
If I set path
to '/'
or '.'
I still get the same error.
Is there any way to read all files in the Data
directory?
Ionic 3 Push Notification
I’ve removed this feature in my application for now but maybe you could try the third one since you are using firebase with your push notifications. I hope this helped you
How to detect if ion-content has a scrollbar?
I want to hide or show elements when there is or there isn’t a scrollbar on ion-content. More specifically, I want to show a button (to load more items in a list) when there’s no scrollbar and hide it where there is a scrollbar (so the loading of more items is done by ion-infinite-scroll).
My Ionic app will also be deployed to the desktop so users with large screens won’t initially see a scrollbar and thus ion-infinite-scroll won’t be triggered.
Here’s a demo that showcases the issue:
home.page.html
<ion-header>
<ion-toolbar>
<ion-title>
Ionic header
</ion-title>
</ion-toolbar>
</ion-header>
<ion-content>
<div class="ion-padding">
<p *ngFor="let item of itemList">{{ item }}</p>
<!-- How to hide this button when ion-content has a scrollbar? -->
<!-- *ngIf="???" -->
<ion-button (click)="incrementItemList(5)">Load more items</ion-button>
</div>
<ion-infinite-scroll (ionInfinite)="loadMoreItems($event)">
<ion-infinite-scroll-content loadingSpinner="crescent"></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer>
<ion-toolbar>
<ion-title>
Ionic footer
</ion-title>
</ion-toolbar>
</ion-footer>
home.page.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage {
itemList: string[] = [];
constructor() {}
ionViewWillEnter() {
this.incrementItemList(5);
}
incrementItemList(times: number) {
for (let i = 1; i <= times; i++) {
this.itemList.push(`Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia placeat nam sapiente iusto eligendi`);
}
}
loadMoreItems(event: any) {
setTimeout(() => {
this.incrementItemList(15);
event.target.complete();
}, 1000);
}
}
I’m using Ionic 4.5.0 + Angular.
I have tried using getScrollElement, scrollHeight, clientHeight, offsetHeight, but with no success.
Any ideas?
Keyboard pushes elements out of top of view?
Thanks This is the only solution that worked in android but it affects whole app. But I want to enable this in one page and disable in another. Is there a way to do this?
Problem with connecting to Android
I already change the clearTextTrafficPermitted=“true” but it still not working. I dont know Is it relate to the android version ? because I use samsung s8 android version 9 but I tried the mi phone android version 8 and it works well!. Any suggestion ?! Please help I have no idea to do with that now.
Thanks in advance.
Livereload ERR_CLEARTEXT_NOT_PERMITTED
this work <domain>PORT_MY_APP_RUNNING_ON</domain>
(i.e. <domain>123.456.7.890</domain>
)