92
questions
0
votes
1
answer
331
views
Ionic Storage (Ionic 8, Angular 17) error: `ERROR NullInjectorError: NullInjectorError: No provider for Storage`
I am encountering the following error in my browser console: ERROR NullInjectorError: NullInjectorError: No provider for Storage!, upon attempting to configure Ionic Storage within Ionic 8 (Angular 17)...
0
votes
1
answer
274
views
Ionic storage-angular error: Can't resolve '@angular/common' in storage-angular/fesm
I'm trying to use ionic/storage-angular in my ionic application. I was following the documentation: https://github.com/ionic-team/ionic-storage.
I installed storage-angular (npm install @ionic/storage-...
0
votes
0
answers
26
views
ionic storage remove function removes data but app size does not change
I am using ionic storage (with SQlite) to store images in my app (not the best solution but the images are sensitive and I don't want to store it online). So I am able to store images and everything ...
0
votes
1
answer
52
views
ionic/angular service.subscribe fired regardless
I am writing the login section for my Ionic app and I'm having a problem with getTokenAsObservable.subscribe().
Basically, when the token is saved (clicked Login button) or deleted (clicked Logout ...
0
votes
2
answers
202
views
Ionic Storage v3 - Unit Tests | TypeError: _this.storage.forEach is not a function
I have a StorageService wrapper for @ionic/storage-angular where I have a function that looks roughly like this:
import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage-...
6
votes
1
answer
941
views
index.js depends on 'localforage'. CommonJS or AMD dependencies can cause optimization bailouts
I got this warning, but I dont understand why 'localforage' depends on CommonJS. I had googled for few days, but I can't find any solution that fit with my problems.
WARNING
C:\xxx\node_modules\@...
0
votes
1
answer
1k
views
What happened to capacitor js storage library?
Plenty of results all over the internet linking to
https://capacitorjs.com/docs/apis/storage
The page is gone and the package seems to be deprecated. I can't find any explanation for its disappearance....
1
vote
0
answers
624
views
@ionic/storage-angular is not working on android?
I have been stock for an hours because of this issue on @ionic/storage-angular it seems that its not working on android?
In my case it work fine on browser the data was stored in the IndexedDB. but ...
0
votes
3
answers
1k
views
Angular 12 + Ionic 5: Resolver does not wait for the Storage and HTTP calls to finish
SITUATION:
This question is regarding a SPA that I am building using Angular 12 and Ionic 5. When I am on the Home page, I can click the "Order History" link in the Side Menu and this routes ...
-1
votes
2
answers
307
views
Ionic Storage not outputing my stored JSON data correctly - Angular
I have something like the following:
Storage.remove({key: 'somedata'}).then(r => {
Storage.set({key: 'somedata', value: data}).then(g => {
Storage.get({key : 'somedata'}).then((...
1
vote
3
answers
3k
views
storage.get is not working in ionic storage (angular)
I'm trying to use ionic storage to save and load an authentication token I use to access the backend API in my APP, but I'm having trouble getting the value from storage.
I've installed ionic storage (...
1
vote
3
answers
4k
views
Ionic-storage with vue
I'm building an application using Ionic Framework v5 with Vue 3.0.0.
I use Vuex store to store global app informations, such as the user login token.
// file src\store.ts
export const store = ...
1
vote
3
answers
4k
views
Ionic Storage : TypeError: Cannot read property 'get' of undefined
I'm using Ionic Storage to store data on the long run. Right now i wanna retrieve data when i go to the Statistics page, so i called the Service i made and wrote the methods in the ngOnInit of the ...
3
votes
0
answers
605
views
Cannot find name 'List'? (Ionic - Angular) when using ViewChild
I am receiving the aforementioned error when trying to use an ion-list in the following context:
My Imports:
import { AddNamePage } from './../add-name/add-name.page';
import { MainService, User } ...
0
votes
0
answers
77
views
Ionic show button if Storage key = true
how to show button if Ionic Storage isLogin = true.
import { Storage } from '@ionic/storage';
constructor(
private storage: Storage,
) { }
login(phone: string, password: string) {
return this....
0
votes
1
answer
469
views
set storage of an object of arrays in Ionic 5
I have an ionic 5 app to be build for browser. I have installed @ionic/Storage, etc. I have a function in my service the current iteration is as follows:
async setStorageObj( key: string, values: ...
1
vote
0
answers
144
views
Can I use ionic/storage on a service-worker sync?
I'm using @ionic/storage on my project to store HTTP requests when the client is offline. Then, when the client back online the service-worker starts to call the requests stored on the storage.
The ...
1
vote
1
answer
475
views
Problems trying to retrieve data from local storage
Im trying to retrieve some data from ionic local storage in this app made in IONIC and ANGULAR.
Still can't see what i'm ommitting but the data doesn't get exposed once the process is triggered.
Lets ...
1
vote
1
answer
645
views
Ionic storage Error missing dependencies: @angular/core
I followed this tutorial to install ionic camera in ionic project, but when I run ionic serve command I am getting this error:
[ng] ERROR in The target entry-point "@ionic/storage" has ...
0
votes
0
answers
286
views
Ionic storage Uncaught TypeError: Cannot read property 'storage' of null error when gettin onesignal playerid
I try to save onesignal playerid into storage. I use this code below;
window["plugins"].OneSignal.getIds(function(ids) {
console.log(ids.userId);
this.storage.set('...
1
vote
2
answers
1k
views
Problems to get the data from Ionic Storage
I have a problem with the Ionic-Storage.
I want to save a boolean into the storage. The action is triggered by an ion-toggle. If the toggle is on= true, otherwise false. So I have create a service, ...
1
vote
1
answer
426
views
Access Ionic Storage directly from Swift via WkWebView
I have an app that was initially developed with Ionic 4 and it's currently being re-developed in Swift.
Once the new Swift app get's rolled out I want to read out the old user settings that were ...
1
vote
3
answers
3k
views
How to get result of promise from angular service with Ionic storage, instead of Promise<any> in response
I'm using Ionic Storage for local storage purpose.
To work with storage I've created service, where I've getter and setter storage methods.
I want to check on load of application that, if any value ...
1
vote
0
answers
307
views
Ionic 4 home page load every time when i close and open app
When the user submits a name it saves in local storage in mobile and it redirects to the second page but the user closes and reopens the application it loads from the first page. below is my code.
...
0
votes
3
answers
334
views
How to use saved data in Ionic/Angular?
I can only use my variable inside the this.storage.get function.
How do I get this saved data?
tab2.page.html:
<ion-toolbar>
<ion-title>
Stats
</ion-title>
</ion-...
0
votes
1
answer
819
views
Ionic Storage value will not display on HTML until page is reloaded
Ionic Storage values aren't displaying on HTML until page gets reloaded.
I looked into some other people who had the same problems but the solutions I found either don't work or don't work anymore due ...
0
votes
3
answers
603
views
How to remove User data from my app through Ionic?
I have an Ionic 4 App that use IonicStorage with IndexDb .
The user will take some photos that will be saved in the storage. After the process is done, if the user will take a look into app settings ...
0
votes
0
answers
85
views
Ionic 4: If i clear the app build(IOS/Android) on devices it's asking me again to re-login
Ionic 4: If I clear the app build(IOS/Android) on devices it's asking me again to re-login and deletes the session but if I Login on the web browser the session is active and I can able to see the ...
0
votes
0
answers
38
views
In Ionic4 Ionic Data Storage is not working in mobile phones
I have attached a images of dashboard that i stored a token value in ionic data storage and i displayed in dashboard. while i seeing in browser its show, but in mobile it didn't show
Mobile Dashboard ...
2
votes
2
answers
1k
views
How use * ngIf to display a button if the key exists in ionic storage
I working on a App that pulls simple online, json below.
json
this.itemList = {
"list": [
{
title: "Power Audit",
text: "666",
textTwo: "",
Type: "auditform-main",
...
0
votes
1
answer
64
views
Ionic storage is returning expected array as a string
I'm storing ID's in the storage.
See example:
I store the storage to a local string [];
The problem is when I try to push new ids to storage.
addIdToDontShowList(id: string): Promise<any&...
2
votes
2
answers
1k
views
Storage not persistent using Ionic Storage
I am attempting to utilize the Ionic Storage library to keep track of settings for my app. However, I am having an issue where each time the app is restarted, the storage is wiped. At least, it ...
0
votes
1
answer
645
views
Angular/Ionic Storage, how to store data dynamically
So I have some code that allows a user to pick a contact and that data gets parsed into an array.
however, the problem is there is no way of storing that data permanently, as the user leaves the ...
0
votes
1
answer
47
views
How can I update a nested array with ionic4 storage
Using
openSavedForm() {
this.storage.get('test').then((val) => {
this.auditResults = JSON.parse(val);
this.audit = this.auditResults
this.auditOne = this.auditResults.siteVehicle;
...
0
votes
2
answers
1k
views
Ionic 4 Storage remove
I have a storage for credential token in my Ionic app, and to perform logout action I need to remove the token stored in it. Here goes my LoginService:
// imports skipped;
export class LoginService ...
0
votes
2
answers
701
views
How do I start the index array after 1 in an ionic 4 App sqlite db
I am looping thought the the sqlite db with ionic storage using this code
ts
listKeys() {
this.storage.keys().then((k) => {
console.table(k);
this.loop = k;
console.log("key value", ...
0
votes
2
answers
389
views
Modify part of object stored in an array in Ionic Storage
I'm trying to modify a part if an object stored in an array in Ionic Storage.
I would like to change the data b to "111" when a === '4'
key : "array"
value : "[{"a":"1","b":"2","c":"3"},{"a":"4","b":"...
0
votes
1
answer
668
views
How to use ionic storage (local database) with ngrx in an ionic angular application
How to use ionic storage (local database) with ngrx in an ionic angular application?
I found some resources about using ngrx with a database as an api, or about ionic-storage. But I am stuck in ...
1
vote
1
answer
296
views
How to pass more than 2 arguments in ionic storage set method
In ionic storage, I want set storage to login details. I have to pass 3 arguments only in single storage.set method.
signIn() {
const { username, password } = this
try {
const form = ...
0
votes
1
answer
290
views
Add an object (json) with a boolean to ionic storage (ionic 4)
i want to add a special favorite to my storage, i can add the number of favorites I want to my storage but i want only 1 is my top favorite !
There is an image to underline you my mind !
I want to ...
0
votes
2
answers
1k
views
In ionic how to set storage to login information so when restarting the app takes directly to the home page
I am using the ionic framework. How do I set storage to login information so if the app restart the user can go to the home page when filling the login information again and again.
import * as ...
2
votes
1
answer
3k
views
Ionic storage get returns a promise "Bearer [object Promise]" How to return a value and use it as authorization token?
Ionic storage.get('token').then() function returns a promise so it is returning a promise object instead of the refresh token.
I am working on a Ionic 4 angular project where I am using JWT for ...
0
votes
1
answer
1k
views
How to delete an element from an array with specific key from local Storage in ionic 4,angular 7
I want to delete an object from an array stored in local storage. With this.storage.remove(key); I can only remove the whole array.A solution i found says that i have to remove the whole array, ...
1
vote
1
answer
115
views
Ionic 3 storage saves for one page but not for the next
I have created an Ionic 3 application that stores a string in Storage. I'm using the SQLlite plugin and I can see that string gets stored properly on a page because immediately after I .set the value, ...
0
votes
1
answer
389
views
Ionic Storage doesn't update values
after I successfully log into my app using Firebase I want to store a bunch of information (like, user email, user uid, user name...) and use it throughout my app. The best way I found for this is to ...
0
votes
1
answer
858
views
Uncaught Error: Can't resolve all parameters for StorageService
I am trying to implement sql storage in an ionic cordova app. i followed the tutorial here: https://ionicacademy.com/ionic-storage-crud-operations/
and the ionic pages here: https://ionicframework.com/...
1
vote
1
answer
257
views
Ionic 3 Storage Issue Not Working in Browser
Ok I'm about to rip my hair out (what's left of it). Whenever I start up the app from scratch after clearing all cookies/storage items I check for certain items...thus seeing if the person is logged ...
0
votes
1
answer
5k
views
How to clear the ionic storage before submitting the new data
I'm creating an ionic app with a webapp inside inappbrowser. I made a separate ionic login form that sends the credentials to the webapp's login form so that I can login in the webapp.
Here's the ...
0
votes
1
answer
3k
views
Ionic Storage is not working on Android device
I'm new to the Ionic Framework, and I'm doing an app that preserves the user login so it can show a different page when user is logged. And for doing this, I'm saving the user ID into the local ...
0
votes
0
answers
1k
views
IONIC Storage is null when i call storage.get(key)
Im trying to set the user info when i login into the app and when i go to the profile page im trying to retrieve the data.
To set and get the user info Im using a separate service
import { ...