Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noob question... $global; variable #150

Open
moses5407 opened this issue Jul 13, 2017 · 7 comments
Open

Noob question... $global; variable #150

moses5407 opened this issue Jul 13, 2017 · 7 comments

Comments

@moses5407
Copy link

Is this available in the browser:

  • at all?
  • via cell?

Thanks!

@gliechtenstein
Copy link
Contributor

@moses5407 I didn't understand what you mean by global variable, could you share an example of what you're trying to do?

@moses5407
Copy link
Author

I was just wondering of the $global.set is available in the browser via cell in the same way it can be used in jasonette to persist data between sessions. I haven't been able to find a clear answer on availability of global variables in browsers.

@gliechtenstein
Copy link
Contributor

@moses5407 haha no, cell is completely separate from Jasonette (although you will see some close integrations between the two in the future). the $global and all those JSON syntax is specific to Jasonette. Cell is a general purpose Javascript library for building web apps. Feel free to ask me further on slack if you need more clarification!

@moses5407
Copy link
Author

Yep..I knew the difference .. but not how that related using a global for persistence. Thanks!

@moses5407
Copy link
Author

Now, why didn't I just ask if there's a local storage solution available for offline situations in cell?
Haha... doing so now.

@moses5407 moses5407 reopened this Jul 20, 2017
@gliechtenstein
Copy link
Contributor

Cell is really just the 3 rules https://github.com/intercellular/cell#there-are-only-3-rules and nothing more.

It's all about how to structure an app, and the whole point of the library is that you don't need some additional API, you use web browser's native API. So it doesn't need any "localstorage solution". You just use window.localStorage

@moses5407
Copy link
Author

moses5407 commented Jul 23, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants