AngularJS Scope - Chrome App -


kind of new angular js i'm using create chrome app.

anyone know how can access chillax.breakinterval (and other properties of 'chillax') within chrome.storage.sync.get callback function?

angular.module('chillaxapp', [])     .controller("chillaxcontroller", function () {      var chillax = this;      chillax.init = function() {         var settings = {};          settings["enabled"] = "";         settings["reminderinterval"] = "";         settings["breakinterval"] = "";         settings["sound"] = "";          chrome.storage.sync.get(settings, function(obj) {             // setting these variables here aren't available within controller             chillax.reminderinterval = obj["reminderinterval"];             chillax.breakinterval = obj["breakinterval"];             chillax.sound = obj["sound"];         });     }; 


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -