Guest User

Untitled

a guest
Oct 8th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function() {
  2.   (function() {
  3.     angular.module('realEstate', ['ngAnimate', 'ngRoute']);
  4.   })();
  5.  
  6. }).call(this);
  7.  
  8. (function() {
  9.   (function() {
  10.     var config;
  11.     config = function($routeProvider, $locationProvider) {
  12.       $routeProvider.when('/', {
  13.         templateUrl: 'index.html'
  14.       }).when('/inserzioni/:idInserzione*', {
  15.         templateUrl: function(urlattr) {
  16.           return 'views/inserzioni/' + urlattr.idInserzione + '.html';
  17.         }
  18.       }).when('/contatti', {
  19.         templateUrl: 'views/contatti.html'
  20.       }).otherwise({
  21.         redirectTo: '/'
  22.       });
  23.     };
  24.     angular.module('realEstate').config(config);
  25.   })();
  26.  
  27. }).call(this);
  28.  
  29. (function() {
  30.   (function() {
  31.     var run;
  32.     run = function($rootScope, $timeout, $window) {
  33.       $rootScope.$on('$viewContentLoaded', function() {
  34.         $timeout((function() {
  35.           $window.scrollTo(0, 0);
  36.         }), 300);
  37.       });
  38.     };
  39.     run.$inject = ['$rootScope', '$timeout', '$window'];
  40.     angular.module('realEstate').run(run);
  41.   })();
  42.  
  43. }).call(this);
  44.  
  45. (function() {
  46.   (function() {
  47.     var AggregateController;
  48.     AggregateController = function($http) {
  49.       var vm;
  50.       vm = this;
  51.       vm.inserzioni = {};
  52.       $http.get("inserzioni.json").success(data)(function() {
  53.         vm.inserzioni = data;
  54.       });
  55.     };
  56.     AggregateController.$inject = ['$http'];
  57.     angular.module('app').controller('AggregateController', AggregateController);
  58.   })();
  59.  
  60. }).call(this);
Add Comment
Please, Sign In to add comment