// The following is the constructor function for this page's controller. See https://docs.angularjs.org/guide/controller
// You can include any angular dependencies as parameters for this function
// TIP: Access Route Parameters for your page via $stateParams.parameterName
function ($scope, $stateParams, Influx) {
$scope.submit = function() {
Influx.last(10).then(function(resp) {
$scope.localTime = function(time) {
// create Date object for current location
return d.toLocaleString();