lundi 23 mars 2020

How to refresh the value of a property in Ember automatically

First off I think that the subject question may not contain the correct context in what I am looking for, but I will try to explain myself.

I am fairly new to Ember, and I am looking for a way to take a property and refresh the value of it, periodically instead of based on the view refreshing, action, or a template element causing the property to change.

This is kind of a generic example, but it closely relates to what I am doing:

  • I have a utility that calculates the size of objects or in specific to what I am doing it will calculate the size of the localStorage.
  • I store the value of that calculation in a property and use it in a "service" and other places throughout the app.

    • Everyplace where I use this property is just a static view, and the user will have no interaction in doing something that will cause an action to update that property.

    any suggestions?




Aucun commentaire:

Enregistrer un commentaire