Git Repository Public Repository

YouAndWeb_TwoToc

URLs

Copy to Clipboard
 
a98e8d4c8be3c9266abcdd007f47a6b1c3ed9599
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'use strict';

angular.module('dashboardApp')
  .controller('MainCtrl', function($scope, $http, $state) {

    $scope.slides = [
      {
        image: 'soccer-ball.jpg',
        text: 'PARTECIPA, ORGANIZZA, GUARDA, SOCIALIZZA'
      },
      {
        image: 'got.jpg',
        text: 'DAJE, SU, MEH, AHO'
      }
    ];

    $scope.search = {};
    $scope.getLocation = function(val) {
      return $http.get('//maps.googleapis.com/maps/api/geocode/json', {
        params: {
          address: val,
          sensor: false
        }
      }).then(function(response){
        return response.data.results.map(function(item){
          $scope.search.lat = (item.geometry.viewport.northeast.lat + item.geometry.viewport.southwest.lat) / 2;
          $scope.search.lng = (item.geometry.viewport.northeast.lng + item.geometry.viewport.southwest.lng) / 2;
          return item.formatted_address;
        });
      });
    };

    $scope.searchShow = function() {
      console.log($scope.search);
      /*$state.go('partecipa', {lat: $scope.search.lat, lng: $scope.search.lng});*/
      $state.go('search', {lat: $scope.search.lat, lng: $scope.search.lng});
    };
  });

Commits for YouAndWeb_TwoTocclient/app/main/main.controller.js

Diff revisions: vs.
Revision Author Commited Message
a98e8d ... Diff Diff FSinnona picture FSinnona Thu 26 Nov, 2015 13:26:45 +0000

Creazione organizza

a2ecfb ... PTKDev Fri 20 Nov, 2015 11:22:35 +0000

TwoToc code