File ClientApp/.angular-cli.json deleted (index 3f6dd08..0000000) |
1 |
|
{
|
|
2 |
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3 |
|
"project": {
|
|
4 |
|
"name": "vega"
|
|
5 |
|
},
|
|
6 |
|
"apps": [
|
|
7 |
|
{
|
|
8 |
|
"root": "src",
|
|
9 |
|
"outDir": "dist",
|
|
10 |
|
"assets": [
|
|
11 |
|
"assets"
|
|
12 |
|
],
|
|
13 |
|
"index": "index.html",
|
|
14 |
|
"main": "main.ts",
|
|
15 |
|
"polyfills": "polyfills.ts",
|
|
16 |
|
"test": "test.ts",
|
|
17 |
|
"tsconfig": "tsconfig.app.json",
|
|
18 |
|
"testTsconfig": "tsconfig.spec.json",
|
|
19 |
|
"prefix": "app",
|
|
20 |
|
"styles": [
|
|
21 |
|
"styles.css",
|
|
22 |
|
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
|
|
23 |
|
],
|
|
24 |
|
"scripts": [],
|
|
25 |
|
"environmentSource": "environments/environment.ts",
|
|
26 |
|
"environments": {
|
|
27 |
|
"dev": "environments/environment.ts",
|
|
28 |
|
"prod": "environments/environment.prod.ts"
|
|
29 |
|
}
|
|
30 |
|
}
|
|
31 |
|
],
|
|
32 |
|
"e2e": {
|
|
33 |
|
"protractor": {
|
|
34 |
|
"config": "./protractor.conf.js"
|
|
35 |
|
}
|
|
36 |
|
},
|
|
37 |
|
"lint": [
|
|
38 |
|
{
|
|
39 |
|
"project": "src/tsconfig.app.json",
|
|
40 |
|
"exclude": "**/node_modules/**"
|
|
41 |
|
},
|
|
42 |
|
{
|
|
43 |
|
"project": "src/tsconfig.spec.json",
|
|
44 |
|
"exclude": "**/node_modules/**"
|
|
45 |
|
},
|
|
46 |
|
{
|
|
47 |
|
"project": "e2e/tsconfig.e2e.json",
|
|
48 |
|
"exclude": "**/node_modules/**"
|
|
49 |
|
}
|
|
50 |
|
],
|
|
51 |
|
"test": {
|
|
52 |
|
"karma": {
|
|
53 |
|
"config": "./karma.conf.js"
|
|
54 |
|
}
|
|
55 |
|
},
|
|
56 |
|
"defaults": {
|
|
57 |
|
"styleExt": "css",
|
|
58 |
|
"component": {},
|
|
59 |
|
"build": {
|
|
60 |
|
"progress": true
|
|
61 |
|
}
|
|
62 |
|
}
|
|
63 |
|
}
|
|
File ClientApp/angular.json added (mode: 100644) (index 0000000..0072026) |
|
1 |
|
{ |
|
2 |
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", |
|
3 |
|
"version": 1, |
|
4 |
|
"newProjectRoot": "projects", |
|
5 |
|
"projects": { |
|
6 |
|
"vega": { |
|
7 |
|
"root": "", |
|
8 |
|
"sourceRoot": "src", |
|
9 |
|
"projectType": "application", |
|
10 |
|
"architect": { |
|
11 |
|
"build": { |
|
12 |
|
"builder": "@angular-devkit/build-angular:browser", |
|
13 |
|
"options": { |
|
14 |
|
"outputPath": "dist", |
|
15 |
|
"index": "src/index.html", |
|
16 |
|
"main": "src/main.ts", |
|
17 |
|
"tsConfig": "src/tsconfig.app.json", |
|
18 |
|
"progress": true, |
|
19 |
|
"polyfills": "src/polyfills.ts", |
|
20 |
|
"assets": [ |
|
21 |
|
"src/assets" |
|
22 |
|
], |
|
23 |
|
"styles": [ |
|
24 |
|
"src/styles.css", |
|
25 |
|
"./node_modules/bootstrap/dist/css/bootstrap.min.css" |
|
26 |
|
], |
|
27 |
|
"scripts": [ |
|
28 |
|
] |
|
29 |
|
}, |
|
30 |
|
"configurations": { |
|
31 |
|
"production": { |
|
32 |
|
"optimization": true, |
|
33 |
|
"outputHashing": "all", |
|
34 |
|
"sourceMap": false, |
|
35 |
|
"extractCss": true, |
|
36 |
|
"namedChunks": false, |
|
37 |
|
"aot": true, |
|
38 |
|
"extractLicenses": true, |
|
39 |
|
"vendorChunk": false, |
|
40 |
|
"buildOptimizer": true, |
|
41 |
|
"fileReplacements": [ |
|
42 |
|
{ |
|
43 |
|
"replace": "src/environments/environment.ts", |
|
44 |
|
"with": "src/environments/environment.prod.ts" |
|
45 |
|
} |
|
46 |
|
] |
|
47 |
|
} |
|
48 |
|
} |
|
49 |
|
}, |
|
50 |
|
"serve": { |
|
51 |
|
"builder": "@angular-devkit/build-angular:dev-server", |
|
52 |
|
"options": { |
|
53 |
|
"browserTarget": "vega:build" |
|
54 |
|
}, |
|
55 |
|
"configurations": { |
|
56 |
|
"production": { |
|
57 |
|
"browserTarget": "vega:build:production" |
|
58 |
|
} |
|
59 |
|
} |
|
60 |
|
}, |
|
61 |
|
"extract-i18n": { |
|
62 |
|
"builder": "@angular-devkit/build-angular:extract-i18n", |
|
63 |
|
"options": { |
|
64 |
|
"browserTarget": "vega:build" |
|
65 |
|
} |
|
66 |
|
}, |
|
67 |
|
"test": { |
|
68 |
|
"builder": "@angular-devkit/build-angular:karma", |
|
69 |
|
"options": { |
|
70 |
|
"main": "src/test.ts", |
|
71 |
|
"karmaConfig": "./karma.conf.js", |
|
72 |
|
"polyfills": "src/polyfills.ts", |
|
73 |
|
"tsConfig": "src/tsconfig.spec.json", |
|
74 |
|
"scripts": [ |
|
75 |
|
], |
|
76 |
|
"styles": [ |
|
77 |
|
"src/styles.css", |
|
78 |
|
"node_modules/bootstrap/dist/css/bootstrap.min.css" |
|
79 |
|
], |
|
80 |
|
"assets": [ |
|
81 |
|
"src/assets" |
|
82 |
|
] |
|
83 |
|
} |
|
84 |
|
}, |
|
85 |
|
"lint": { |
|
86 |
|
"builder": "@angular-devkit/build-angular:tslint", |
|
87 |
|
"options": { |
|
88 |
|
"tsConfig": [ |
|
89 |
|
"src/tsconfig.app.json", |
|
90 |
|
"src/tsconfig.spec.json" |
|
91 |
|
], |
|
92 |
|
"exclude": [ |
|
93 |
|
"**/node_modules/**" |
|
94 |
|
] |
|
95 |
|
} |
|
96 |
|
} |
|
97 |
|
} |
|
98 |
|
}, |
|
99 |
|
"vega-e2e": { |
|
100 |
|
"root": "e2e", |
|
101 |
|
"sourceRoot": "e2e", |
|
102 |
|
"projectType": "application", |
|
103 |
|
"architect": { |
|
104 |
|
"e2e": { |
|
105 |
|
"builder": "@angular-devkit/build-angular:protractor", |
|
106 |
|
"options": { |
|
107 |
|
"protractorConfig": "./protractor.conf.js", |
|
108 |
|
"devServerTarget": "vega:serve" |
|
109 |
|
} |
|
110 |
|
}, |
|
111 |
|
"lint": { |
|
112 |
|
"builder": "@angular-devkit/build-angular:tslint", |
|
113 |
|
"options": { |
|
114 |
|
"tsConfig": [ |
|
115 |
|
"e2e/tsconfig.e2e.json" |
|
116 |
|
], |
|
117 |
|
"exclude": [ |
|
118 |
|
"**/node_modules/**" |
|
119 |
|
] |
|
120 |
|
} |
|
121 |
|
} |
|
122 |
|
} |
|
123 |
|
} |
|
124 |
|
}, |
|
125 |
|
"defaultProject": "vega", |
|
126 |
|
"schematics": { |
|
127 |
|
"@schematics/angular:component": { |
|
128 |
|
"prefix": "app", |
|
129 |
|
"styleext": "css" |
|
130 |
|
}, |
|
131 |
|
"@schematics/angular:directive": { |
|
132 |
|
"prefix": "app" |
|
133 |
|
} |
|
134 |
|
} |
|
135 |
|
} |
File ClientApp/karma.conf.js changed (mode: 100644) (index 3efd404..0f2aeb5) |
4 |
4 |
module.exports = function (config) {
|
module.exports = function (config) {
|
5 |
5 |
config.set({
|
config.set({
|
6 |
6 |
basePath: '',
|
basePath: '',
|
7 |
|
frameworks: ['jasmine', '@angular/cli'],
|
|
|
7 |
|
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
8 |
8 |
plugins: [
|
plugins: [
|
9 |
9 |
require('karma-jasmine'),
|
require('karma-jasmine'),
|
10 |
10 |
require('karma-chrome-launcher'),
|
require('karma-chrome-launcher'),
|
11 |
11 |
require('karma-jasmine-html-reporter'),
|
require('karma-jasmine-html-reporter'),
|
12 |
12 |
require('karma-coverage-istanbul-reporter'),
|
require('karma-coverage-istanbul-reporter'),
|
13 |
|
require('@angular/cli/plugins/karma')
|
|
|
13 |
|
require('@angular-devkit/build-angular/plugins/karma')
|
14 |
14 |
],
|
],
|
15 |
15 |
client:{
|
client:{
|
16 |
16 |
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
17 |
17 |
},
|
},
|
18 |
18 |
coverageIstanbulReporter: {
|
coverageIstanbulReporter: {
|
19 |
|
reports: [ 'html', 'lcovonly' ],
|
|
|
19 |
|
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
|
20 |
20 |
fixWebpackSourcePaths: true
|
fixWebpackSourcePaths: true
|
21 |
21 |
},
|
},
|
22 |
|
angularCli: {
|
|
23 |
|
environment: 'dev'
|
|
24 |
|
},
|
|
|
22 |
|
|
25 |
23 |
reporters: ['progress', 'kjhtml'],
|
reporters: ['progress', 'kjhtml'],
|
26 |
24 |
port: 9876,
|
port: 9876,
|
27 |
25 |
colors: true,
|
colors: true,
|
File ClientApp/package.json changed (mode: 100644) (index 74d9cb3..58a9730) |
1 |
|
{
|
|
2 |
|
"name": "vega",
|
|
3 |
|
"version": "0.0.0",
|
|
4 |
|
"license": "MIT",
|
|
5 |
|
"scripts": {
|
|
6 |
|
"ng": "ng",
|
|
7 |
|
"start": "ng serve --extract-css",
|
|
8 |
|
"build": "ng build --extract-css",
|
|
9 |
|
"build:ssr": "npm run build -- --app=ssr --output-hashing=media",
|
|
10 |
|
"test": "ng test",
|
|
11 |
|
"lint": "ng lint",
|
|
12 |
|
"e2e": "ng e2e"
|
|
13 |
|
},
|
|
14 |
|
"private": true,
|
|
15 |
|
"dependencies": {
|
|
16 |
|
"@angular/animations": "^5.2.0",
|
|
17 |
|
"@angular/common": "^5.2.0",
|
|
18 |
|
"@angular/compiler": "^5.2.0",
|
|
19 |
|
"@angular/core": "^5.2.0",
|
|
20 |
|
"@angular/forms": "^5.2.0",
|
|
21 |
|
"@angular/http": "^5.2.0",
|
|
22 |
|
"@angular/platform-browser": "^5.2.0",
|
|
23 |
|
"@angular/platform-browser-dynamic": "^5.2.0",
|
|
24 |
|
"@angular/platform-server": "^5.2.0",
|
|
25 |
|
"@angular/router": "^5.2.0",
|
|
26 |
|
"@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5",
|
|
27 |
|
"aspnet-prerendering": "^3.0.1",
|
|
28 |
|
"bootstrap": "^3.3.7",
|
|
29 |
|
"core-js": "^2.4.1",
|
|
30 |
|
"rxjs": "^5.5.6",
|
|
31 |
|
"zone.js": "^0.8.19"
|
|
32 |
|
},
|
|
33 |
|
"devDependencies": {
|
|
34 |
|
"@angular/cli": "~1.7.0",
|
|
35 |
|
"@angular/compiler-cli": "^5.2.0",
|
|
36 |
|
"@angular/language-service": "^5.2.0",
|
|
37 |
|
"@types/jasmine": "~2.8.3",
|
|
38 |
|
"@types/jasminewd2": "~2.0.2",
|
|
39 |
|
"@types/node": "~6.0.60",
|
|
40 |
|
"codelyzer": "^4.0.1",
|
|
41 |
|
"jasmine-core": "~2.8.0",
|
|
42 |
|
"jasmine-spec-reporter": "~4.2.1",
|
|
43 |
|
"karma": "~2.0.0",
|
|
44 |
|
"karma-chrome-launcher": "~2.2.0",
|
|
45 |
|
"karma-coverage-istanbul-reporter": "^1.2.1",
|
|
46 |
|
"karma-jasmine": "~1.1.0",
|
|
47 |
|
"karma-jasmine-html-reporter": "^0.2.2",
|
|
48 |
|
"protractor": "~5.1.2",
|
|
49 |
|
"ts-node": "~4.1.0",
|
|
50 |
|
"tslint": "~5.9.1",
|
|
51 |
|
"typescript": "~2.5.3"
|
|
52 |
|
},
|
|
53 |
|
"optionalDependencies": {
|
|
54 |
|
"node-sass": "^4.9.0"
|
|
55 |
|
}
|
|
56 |
|
}
|
|
|
1 |
|
{ |
|
2 |
|
"name": "vega", |
|
3 |
|
"version": "0.0.0", |
|
4 |
|
"license": "MIT", |
|
5 |
|
"scripts": { |
|
6 |
|
"ng": "ng", |
|
7 |
|
"start": "ng serve", |
|
8 |
|
"build": "ng build", |
|
9 |
|
"build:ssr": "npm run build -- --app=ssr --output-hashing=media", |
|
10 |
|
"test": "ng test", |
|
11 |
|
"lint": "ng lint", |
|
12 |
|
"e2e": "ng e2e" |
|
13 |
|
}, |
|
14 |
|
"private": true, |
|
15 |
|
"dependencies": { |
|
16 |
|
"@angular/animations": "7.2.0", |
|
17 |
|
"@angular/common": "7.2.0", |
|
18 |
|
"@angular/compiler": "7.2.0", |
|
19 |
|
"@angular/core": "7.2.0", |
|
20 |
|
"@angular/forms": "7.2.0", |
|
21 |
|
"@angular/http": "7.2.0", |
|
22 |
|
"@angular/platform-browser": "7.2.0", |
|
23 |
|
"@angular/platform-browser-dynamic": "7.2.0", |
|
24 |
|
"@angular/platform-server": "7.2.0", |
|
25 |
|
"@angular/router": "7.2.0", |
|
26 |
|
"@nguniversal/module-map-ngfactory-loader": "^7.0.2", |
|
27 |
|
"aspnet-prerendering": "^3.0.1", |
|
28 |
|
"bootstrap": "^4.2.1", |
|
29 |
|
"core-js": "^2.6.1", |
|
30 |
|
"ngx-bootstrap": "^3.1.4", |
|
31 |
|
"ngx-toasta": "^0.1.0", |
|
32 |
|
"rxjs": "^6.3.3", |
|
33 |
|
"tslib": "^1.9.0", |
|
34 |
|
"zone.js": "^0.8.26" |
|
35 |
|
}, |
|
36 |
|
"devDependencies": { |
|
37 |
|
"@angular-devkit/build-angular": "^0.12.0", |
|
38 |
|
"@angular/cli": "7.1.4", |
|
39 |
|
"@angular/compiler-cli": "7.2.0", |
|
40 |
|
"@angular/language-service": "7.2.0", |
|
41 |
|
"@types/jasmine": "^3.3.5", |
|
42 |
|
"@types/jasminewd2": "^2.0.6", |
|
43 |
|
"@types/node": "^10.12.18", |
|
44 |
|
"codelyzer": "^4.5.0", |
|
45 |
|
"jasmine-core": "~3.3.0", |
|
46 |
|
"jasmine-spec-reporter": "~4.2.1", |
|
47 |
|
"karma": "^3.1.4", |
|
48 |
|
"karma-chrome-launcher": "~2.2.0", |
|
49 |
|
"karma-coverage-istanbul-reporter": "^2.0.4", |
|
50 |
|
"karma-jasmine": "^2.0.1", |
|
51 |
|
"karma-jasmine-html-reporter": "^1.4.0", |
|
52 |
|
"protractor": "^5.4.2", |
|
53 |
|
"ts-node": "~7.0.1", |
|
54 |
|
"tslint": "~5.12.0", |
|
55 |
|
"typescript": "3.2.2" |
|
56 |
|
}, |
|
57 |
|
"optionalDependencies": { |
|
58 |
|
"node-sass": "^4.9.0" |
|
59 |
|
} |
|
60 |
|
} |
File ClientApp/src/app/nav-menu/nav-menu.component.css changed (mode: 100644) (index f76d035..c41e005) |
1 |
|
li .glyphicon {
|
|
|
1 |
|
li .fa {
|
2 |
2 |
margin-right: 10px;
|
margin-right: 10px;
|
3 |
|
}
|
|
4 |
|
|
|
5 |
|
/* Highlighting rules for nav menu items */
|
|
6 |
|
li.link-active a,
|
|
7 |
|
li.link-active a:hover,
|
|
8 |
|
li.link-active a:focus {
|
|
|
3 |
|
}
|
|
4 |
|
|
|
5 |
|
.flex-column {
|
|
6 |
|
width: 100%;
|
|
7 |
|
}
|
|
8 |
|
|
|
9 |
|
.navbar {
|
|
10 |
|
padding: 0;
|
|
11 |
|
}
|
|
12 |
|
|
|
13 |
|
.navbar-brand {
|
|
14 |
|
padding: 15px;
|
|
15 |
|
}
|
|
16 |
|
|
|
17 |
|
.navbar-toggler {
|
|
18 |
|
margin-right: 15px;
|
|
19 |
|
}
|
|
20 |
|
|
|
21 |
|
.nav-link {
|
|
22 |
|
padding-left: 16px;
|
|
23 |
|
}
|
|
24 |
|
|
|
25 |
|
/* Highlighting rules for nav menu items */
|
|
26 |
|
li.link-active a,
|
|
27 |
|
li.link-active a:hover,
|
|
28 |
|
li.link-active a:focus {
|
9 |
29 |
background-color: #4189C7;
|
background-color: #4189C7;
|
10 |
30 |
color: white;
|
color: white;
|
11 |
|
}
|
|
12 |
|
|
|
13 |
|
/* Keep the nav menu independent of scrolling and on top of other items */
|
|
14 |
|
.main-nav {
|
|
|
31 |
|
}
|
|
32 |
|
|
|
33 |
|
/* Keep the nav menu independent of scrolling and on top of other items */
|
|
34 |
|
.main-nav {
|
15 |
35 |
position: fixed;
|
position: fixed;
|
16 |
36 |
top: 0;
|
top: 0;
|
17 |
37 |
left: 0;
|
left: 0;
|
18 |
38 |
right: 0;
|
right: 0;
|
19 |
39 |
z-index: 1;
|
z-index: 1;
|
20 |
|
}
|
|
21 |
|
|
|
22 |
|
@media (min-width: 768px) {
|
|
|
40 |
|
}
|
|
41 |
|
|
|
42 |
|
@media (min-width: 576px) {
|
23 |
43 |
/* On small screens, convert the nav menu to a vertical sidebar */
|
/* On small screens, convert the nav menu to a vertical sidebar */
|
24 |
44 |
.main-nav {
|
.main-nav {
|
25 |
|
height: 100%;
|
|
26 |
|
width: calc(25% - 20px);
|
|
|
45 |
|
height: 100%;
|
|
46 |
|
width: calc(25% - 20px);
|
27 |
47 |
}
|
}
|
28 |
48 |
.navbar {
|
.navbar {
|
29 |
|
border-radius: 0px;
|
|
30 |
|
border-width: 0px;
|
|
31 |
|
height: 100%;
|
|
|
49 |
|
border-radius: 0px;
|
|
50 |
|
border-width: 0px;
|
|
51 |
|
height: 100%;
|
|
52 |
|
display: block;
|
32 |
53 |
}
|
}
|
33 |
54 |
.navbar-header {
|
.navbar-header {
|
34 |
|
float: none;
|
|
|
55 |
|
float: none;
|
35 |
56 |
}
|
}
|
36 |
57 |
.navbar-collapse {
|
.navbar-collapse {
|
37 |
|
border-top: 1px solid #444;
|
|
38 |
|
padding: 0px;
|
|
|
58 |
|
border-top: 1px solid #444;
|
|
59 |
|
padding: 0px;
|
39 |
60 |
}
|
}
|
40 |
61 |
.navbar ul {
|
.navbar ul {
|
41 |
|
float: none;
|
|
|
62 |
|
float: none;
|
42 |
63 |
}
|
}
|
43 |
64 |
.navbar li {
|
.navbar li {
|
44 |
|
float: none;
|
|
45 |
|
font-size: 15px;
|
|
46 |
|
margin: 6px;
|
|
|
65 |
|
float: none;
|
|
66 |
|
font-size: 15px;
|
|
67 |
|
margin: 6px;
|
47 |
68 |
}
|
}
|
48 |
69 |
.navbar li a {
|
.navbar li a {
|
49 |
|
padding: 10px 16px;
|
|
50 |
|
border-radius: 4px;
|
|
|
70 |
|
padding: 10px 16px;
|
|
71 |
|
border-radius: 4px;
|
51 |
72 |
}
|
}
|
52 |
73 |
.navbar a {
|
.navbar a {
|
53 |
|
/* If a menu item's text is too long, truncate it */
|
|
54 |
|
width: 100%;
|
|
55 |
|
white-space: nowrap;
|
|
56 |
|
overflow: hidden;
|
|
57 |
|
text-overflow: ellipsis;
|
|
|
74 |
|
/* If a menu item's text is too long, truncate it */
|
|
75 |
|
width: 100%;
|
|
76 |
|
white-space: nowrap;
|
|
77 |
|
overflow: hidden;
|
|
78 |
|
text-overflow: ellipsis;
|
58 |
79 |
}
|
}
|
59 |
|
}
|
|
|
80 |
|
} |
File ClientApp/src/app/nav-menu/nav-menu.component.html changed (mode: 100644) (index d2228e5..4eda87a) |
1 |
1 |
<div class='main-nav'>
|
<div class='main-nav'>
|
2 |
|
<div class='navbar navbar-inverse'>
|
|
3 |
|
<div class='navbar-header'>
|
|
4 |
|
<button type='button' class='navbar-toggle' data-toggle='collapse' data-target='.navbar-collapse' [attr.aria-expanded]='isExpanded' (click)='toggle()'>
|
|
5 |
|
<span class='sr-only'>Toggle navigation</span>
|
|
6 |
|
<span class='icon-bar'></span>
|
|
7 |
|
<span class='icon-bar'></span>
|
|
8 |
|
<span class='icon-bar'></span>
|
|
9 |
|
</button>
|
|
10 |
|
<a class='navbar-brand' [routerLink]='["/"]'>vega</a>
|
|
11 |
|
</div>
|
|
12 |
|
<div class='clearfix'></div>
|
|
13 |
|
<div class='navbar-collapse collapse' [ngClass]='{ "in": isExpanded }'>
|
|
14 |
|
<ul class='nav navbar-nav'>
|
|
15 |
|
<li [routerLinkActive]='["link-active"]' [routerLinkActiveOptions]='{ exact: true }'>
|
|
16 |
|
<a [routerLink]='["/"]' (click)='collapse()'>
|
|
17 |
|
<span class='glyphicon glyphicon-home'></span> Home
|
|
18 |
|
</a>
|
|
19 |
|
</li>
|
|
20 |
|
<li [routerLinkActive]='["link-active"]' [routerLinkActiveOptions]='{ exact: true }'>
|
|
21 |
|
<a [routerLink]='["/vehicles/new"]' (click)='collapse()'>
|
|
22 |
|
<span class='glyphicon glyphicon-plus'></span> New Vehicle
|
|
23 |
|
</a>
|
|
24 |
|
</li>
|
|
25 |
|
<li [routerLinkActive]='["link-active"]'>
|
|
26 |
|
<a [routerLink]='["/counter"]' (click)='collapse()'>
|
|
27 |
|
<span class='glyphicon glyphicon-education'></span> Counter
|
|
28 |
|
</a>
|
|
29 |
|
</li>
|
|
30 |
|
<li [routerLinkActive]='["link-active"]'>
|
|
31 |
|
<a [routerLink]='["/fetch-data"]' (click)='collapse()'>
|
|
32 |
|
<span class='glyphicon glyphicon-th-list'></span> Fetch data
|
|
|
2 |
|
<div class='navbar navbar-dark bg-dark navbar-expand-sm'>
|
|
3 |
|
<a class='navbar-brand' [routerLink]='["/"]'>Vega</a>
|
|
4 |
|
<button type='button' class='navbar-toggler' data-toggle='collapse' data-target='.navbar-collapse' (click)='toggle()'>
|
|
5 |
|
<span class="navbar-toggler-icon"></span>
|
|
6 |
|
</button>
|
|
7 |
|
<div class='navbar-collapse collapse' [ngClass]='{ "collapse": !isExpanded }'>
|
|
8 |
|
<ul class='navbar-nav flex-column'>
|
|
9 |
|
<li class="nav-item" [routerLinkActive]='["link-active"]' [routerLinkActiveOptions]='{ exact: true }'>
|
|
10 |
|
<a class="nav-link" [routerLink]='["/"]' (click)='collapse()'>
|
|
11 |
|
<span class='fa fa-home'></span> Home
|
|
12 |
|
</a>
|
|
13 |
|
</li>
|
|
14 |
|
<li class="nav-item" [routerLinkActive]='["link-active"]' [routerLinkActiveOptions]='{ exact: true }'>
|
|
15 |
|
<a class="nav-link" [routerLink]='["/vehicles/new"]' (click)='collapse()'>
|
|
16 |
|
<span class='fa fa-graduation-cap'></span> New Vehicle
|
33 |
17 |
</a>
|
</a>
|
34 |
18 |
</li>
|
</li>
|
|
19 |
|
<li class="nav-item" [routerLinkActive]='["link-active"]'>
|
|
20 |
|
<a class="nav-link" [routerLink]='["/counter"]' (click)='collapse()'>
|
|
21 |
|
<span class='fa fa-graduation-cap'></span> Counter
|
|
22 |
|
</a>
|
|
23 |
|
</li>
|
|
24 |
|
<li class="nav-item" [routerLinkActive]='["link-active"]'>
|
|
25 |
|
<a class="nav-link" [routerLink]='["/fetch-data"]' (click)='collapse()'>
|
|
26 |
|
<span class='fa fa-sun-o'></span> Fetch data
|
|
27 |
|
</a>
|
|
28 |
|
</li>
|
35 |
29 |
</ul>
|
</ul>
|
|
30 |
|
</div>
|
36 |
31 |
</div>
|
</div>
|
37 |
|
</div>
|
|
38 |
|
</div>
|
|
|
32 |
|
</div> |
File ClientApp/src/app/services/vehicle.service.ts changed (mode: 100644) (index 55f1c81..6d5c0b8) |
1 |
1 |
import { Injectable } from '@angular/core'; |
import { Injectable } from '@angular/core'; |
2 |
2 |
import { Http } from '@angular/http' |
import { Http } from '@angular/http' |
3 |
|
import 'rxjs/add/operator/map' |
|
|
3 |
|
import { map } from 'rxjs/operators'; |
4 |
4 |
|
|
5 |
5 |
@Injectable() |
@Injectable() |
6 |
6 |
export class VehicleService { |
export class VehicleService { |
|
... |
... |
export class VehicleService { |
9 |
9 |
|
|
10 |
10 |
getMakes(){ |
getMakes(){ |
11 |
11 |
return this.http.get('/api/makes') |
return this.http.get('/api/makes') |
12 |
|
.map(res => res.json()); |
|
|
12 |
|
.pipe(map((res: any) => res.json())); |
13 |
13 |
} |
} |
14 |
14 |
|
|
15 |
15 |
getFeatures(){ |
getFeatures(){ |
16 |
16 |
return this.http.get('/api/features') |
return this.http.get('/api/features') |
17 |
|
.map(res => res.json()); |
|
|
17 |
|
.pipe(map((res: any) => res.json())); |
18 |
18 |
} |
} |
19 |
19 |
|
|
20 |
20 |
create(vehicle) { |
create(vehicle) { |
21 |
21 |
return this.http.post('/api/vehicles', vehicle) |
return this.http.post('/api/vehicles', vehicle) |
22 |
|
.map(res => res.json()); |
|
|
22 |
|
.pipe(map((res: any) => res.json())); |
23 |
23 |
} |
} |
24 |
24 |
} |
} |