github.com/ckxng/wakeup@v0.0.0-20190105202853-90356a5f5a15/Release/assets/js/400_pageFactory.js (about) 1 // Copyright (c) 2015 Cameron King. All rights reserved. 2 // License: BSD 2-clause. 3 // Website: https://github.com/ckxng/wakeup 4 5 var pageFactory = angular.module('pageFactory', []); 6 7 pageFactory.factory('Page', function() { 8 var title = ''; 9 var hh = '00'; 10 var mm = '00'; 11 var ss = '00'; 12 var tt = 'XM'; 13 14 return { 15 title: function() { return title; }, 16 setTitle: function(x) { title = x }, 17 hh: function() { return hh; }, 18 mm: function() { return mm; }, 19 ss: function() { return ss; }, 20 tt: function() { return tt; }, 21 setTime: function(x) { 22 hh = x.format("hh"); 23 mm = x.format("MM"); 24 ss = x.format("ss"); 25 tt = x.format("TT"); 26 }, 27 }; 28 });