-
Notifications
You must be signed in to change notification settings - Fork 0
/
controllers.js
55 lines (48 loc) · 1.28 KB
/
controllers.js
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**
* Created by Volodimir on 13.11.2015.
*/
"use strict";
var CheckAuto = angular.module('CheckAuto', ['ngRoute']);
CheckAuto.config(['$routeProvider','$locationProvider',function($routeProvide,$locationProvider){
//$locationProvider.html5Mode({
// enabled: true,
// requireBase: true
//});
$routeProvide
.when('/',{
templateUrl: 'template/home.html',
controller: 'HomeCtrl'
})
.when('/about',{
templateUrl: 'template/about.html',
controller: 'AboutCtrl'
})
.when('/contact',{
templateUrl: 'template/contact.html',
controller: 'ContactCtrl'
})
.otherwise({
redirectTo: '/'
});
}]);
CheckAuto.controller('HomeCtrl', function($scope){
$scope.text = 'Введіть VIN';
$scope.list = [];
$scope.submit = function(){
if($scope.text){
$scope.list.push(this.text);
}
};
});
CheckAuto.controller('AboutCtrl', function($scope){
});
CheckAuto.controller('ContactCtrl', function($scope,$http){
$scope.submit = function(){
var feedback = {
email: $scope.email,
text: $scope.text
};
//sendMailByAPI(feedback,$http);
sendMail(feedback);
}
});