Saving Data in Ionic

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024

Комментарии • 40

  • @D3FKONMusik123
    @D3FKONMusik123 7 лет назад +12

    I'll be really happy if you did a SQLite video, and how to store data in tables.
    Storing data in key value pairs, isn't the best in every situation.

    • @IMHGfk
      @IMHGfk 6 лет назад

      Being a Frontend Web Developer, I am trying to grasp an understanding of exactly when and why to either chose key/value storage vs. sqlite. That could also be part of such a tutorial, which I am looking forward to watching ;)

  • @PraveenSpeaksUK
    @PraveenSpeaksUK 7 лет назад

    Hello i tried this in ionic 2 but having issue in getting data outside of the below function, it gives value in console.log but undefined outside where i want to use this data. I tried every trick and methods but did not get any success...Please help me how to get data back from storage....
    getStartTime(){
    this.storage.get('stime').then( (val) => {
    this.stime = val;
    console.log(this.stime);
    });
    if(this.stime !== null){
    return this.stime;
    }else{
    return 0;
    }
    }

  • @fvandrade
    @fvandrade 2 года назад

    Comigo, funcionou após por o comando pra criar o database

  • @sebastianguandinango8056
    @sebastianguandinango8056 4 года назад

    Is it possible to add more data in the existing json file?

  • @AuthorJamsNRosesGoogle
    @AuthorJamsNRosesGoogle 5 лет назад

    Nice video as always. Question, if I may... So would you need to be hooked up'to the Internet to use this storage function? If I had an app that I wanted use somewhere with no Wi-Fi, would the app be rendered useless if it'depended on this storage function?

  • @merseyviking
    @merseyviking 6 лет назад

    If you're using a more recent version of ionic-storage (2.0.0+), see here for how to add it to app.module.ts: github.com/ionic-team/ionic-storage/releases/tag/v2.0.0

  • @AbdullahRady
    @AbdullahRady 2 года назад

    Thanks a lot!

  • @saurabhsharma-dl2xc
    @saurabhsharma-dl2xc 5 лет назад

    how to save the value of radio button or drop down list in API any suggestion .........??

  • @kamleshutube
    @kamleshutube 7 лет назад

    Hi Joshua,
    Property 'set' does not exist on type 'IonicStorageModule'. same issue with get. What to do next ?

  • @jeremyhunt9960
    @jeremyhunt9960 6 лет назад

    I am just learning ionic and your videos are a huge help. thank you. I do not know if something has changed since you made this, but adding Storage to providers in app.module.ts was causing an error for me, I had to add "IonicStorageModule.forRoot()" in imports. as i said I am just learning and I am not sure what the ramifications to this change are/mean yet but i thot I would give you a heads up. thanks again.

  • @pratikvaity6833
    @pratikvaity6833 5 лет назад

    Can I store embeded youtube videos using storage?

  • @ptlh1969
    @ptlh1969 7 лет назад

    Hi Josh, great video thanks. I have a special request on how to save an image in IONIC 2 to remote storage e.g. Firebase? I have tried to do it for weeks but still getting to nowhere .... :(.

  • @zaboomafia
    @zaboomafia 7 лет назад

    Is it possible to inject the storage into a custom provider? I'm getting this error when I try. "Cannot read property set of undefined". I have included the storage library and injected it into the constructor.

  • @adir191
    @adir191 7 лет назад

    hey Joshue, thank you for great videos! what difference between LocalStorage to Sqlite?

  • @abishekkachroo938
    @abishekkachroo938 7 лет назад

    i like your videos but i kindda started hating sublime text 2
    I am getting error
    Cant resolve all parameters for Storage ?
    Any 1 getting the same thing and know how to overcome it ??

  • @raylawlor4887
    @raylawlor4887 7 лет назад

    Hi Josh... Many thanks for the vid...
    Quick question...
    Is there any way of storing "deeper" data in storage i.e. objects, rather than a simple key/data pair?
    So something like:
    {“items” :
    [{
    ”itema”: true,
    “itemb”: false
    }],
    "boxes":
    [{
    ”boxa”: true,
    “boxb”: false
    }]
    }
    Then add items to items and boxes to boxes?
    Many thanks again. :)

    • @raylawlor4887
      @raylawlor4887 7 лет назад +2

      Just tested a solution... we can simply build an object and send it in as the 2nd param of "set"... so...
      this.storage.set('items', itemsObject);

  • @Jussoparkours
    @Jussoparkours 7 лет назад

    love the videos, very helpful so far. Could you do a video on how to persist data to a API endpoint? I've been trying for over a week with no luck.

  • @theprogrammer1677
    @theprogrammer1677 7 лет назад

    Does it do the same if I used File in stead of storage? Because that can do much more... you can create files and directories and so on... And does the Storage also survive a restart of the application or if you force it to get closed?

  • @sidharthramanan8297
    @sidharthramanan8297 7 лет назад

    I'm getting the error " Can't resolve all parameters for storage " . Could someone help me with that ?

  • @H10b1z4t0r
    @H10b1z4t0r 7 лет назад

    How to display that data as html component? I'm new in Ionic.

  • @sovanraksmey2637
    @sovanraksmey2637 6 лет назад

    how to use sqlite ? please create new tutorial !!! i really love your teach .

  • @zacturner7894
    @zacturner7894 6 лет назад

    Good explanation mate, very clear and concise.

  • @falaTabacudo
    @falaTabacudo 7 лет назад

    please create video, how to generate apk, android and windows 10 mobile, tks !

    • @rnseby
      @rnseby 7 лет назад

      I'm using Visual Studio 2015 Community Edition to make my apps.
      taco.visualstudio.com
      And there are instructions for using Ionic.

  • @JenishMaharjan
    @JenishMaharjan 7 лет назад

    Thank you very much

  • @pavelkoryakin5750
    @pavelkoryakin5750 7 лет назад

    Nice shit!

  • @JonasMoreira
    @JonasMoreira 7 лет назад

    It's possible to put a JSON object in storage, correct?
    The limit of storage is the available space on device?

    • @JoshuaMorony
      @JoshuaMorony  7 лет назад +1

      Yes, you can store a JSON object on a single key using Storage. When using browser based storage there is a limit (I think it is 5MB, though that may have changed), when using SQLite then yes, I believe it is only limited by available space on the device.

    • @mahmoudtokura
      @mahmoudtokura 7 лет назад

      I'm trying to store JSON Data, but its not working any ideas, Thanks

    • @JonasMoreira
      @JonasMoreira 7 лет назад +1

      try to use JSON.encode({ x: 5, y: 6 }); to write and JSON.decode to read.

    • @mahmoudtokura
      @mahmoudtokura 7 лет назад

      I'm getting the data from a http request, the code looks like this:
      this.storage.ready().then(() => {
      if(this.wordPressData != null ){
      this.storage.set('myData', this.wordPressData);
      }

  • @RobsonCurvello
    @RobsonCurvello 7 лет назад

    Is it possible to save data locally (offline app) and then sync with database online? How to do this?

    • @JoshuaMorony
      @JoshuaMorony  7 лет назад +1

      Yes - check out PouchDB for this, it can sync to any database that uses the CouchDB protocol.

    • @user-kd5nr4ui2q
      @user-kd5nr4ui2q 7 лет назад

      Joshua Morony

  • @donjonio
    @donjonio 7 лет назад

    Is the Storage you used in this example only browser based or is it for native storage?

    • @JoshuaMorony
      @JoshuaMorony  7 лет назад

      Both - if the SQLite plugin is installed it will use that, if not it will use browser storage

    • @donjonio
      @donjonio 7 лет назад

      Could we use the same syntax with the SQLite plugin or do we have to write queries?

    • @N96123
      @N96123 7 лет назад

      No. SQLite uses querys like select from table, create table, update table etc.