snipt/media/js/src/snipts.min.js

2 lines
580 B
JavaScript

(function(){'use strict';if(typeof angular!=='undefined'){var root=this;var $=root.jQuery;var controllers={};var app=root.app;controllers.SniptListController=function($scope,AccountStorage){$scope.$root.account={list_view:'N'};AccountStorage.getAccount().then(function(response){$scope.$root.account=response.data;$scope.$root.$watch('account.list_view',function(newView,oldView){if(oldView!==newView){AccountStorage.saveAccount($scope.$root.account,['list_view']).then(function(response){$scope.$root.account=response.data;});}});});};app.controller(controllers);}}).call(this);