| author | cavaliet |
| Thu, 02 Oct 2014 13:24:57 +0200 | |
| changeset 1 | 74bbdd739878 |
| parent 0 | cef349423167 |
| child 8 | 824c87a9084c |
| permissions | -rw-r--r-- |
| 0 | 1 |
(function(){ |
2 |
'use strict'; |
|
3 |
||
4 |
||
5 |
angular.module('ammicoHome',['ngRoute']) |
|
6 |
.config(function ($routeProvider) { |
|
7 |
$routeProvider |
|
8 |
.when('/', { |
|
9 |
templateUrl: 'home/home.html', |
|
10 |
controller: 'homeCtrl' |
|
11 |
}); |
|
12 |
}) |
|
13 |
.controller('homeCtrl', function($scope, $location){ |
|
14 |
console.log('5-0',$scope, $location); |
|
| 1 | 15 |
$scope.searchSubmit = function(){ |
16 |
$location.path('/search/' + $scope.q); |
|
17 |
}; |
|
| 0 | 18 |
}); |
19 |
||
20 |
})(); |