-
Notifications
You must be signed in to change notification settings - Fork 383
Expand file tree
/
Copy pathapp.component.ts
More file actions
97 lines (91 loc) · 3.71 KB
/
app.component.ts
File metadata and controls
97 lines (91 loc) · 3.71 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { Renderer2 } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'angular-starter';
version = 'Angular version 10.1.4';
items = [
{
name: 'Reactive Form', link: 'reactive-form',
elements: [
{ name: 'prototype', link: 'reactive-form/prototype' },
{ name: 'form-control', link: 'reactive-form/form-control' },
{ name: 'form-control-class', link: 'reactive-form/form-control-class' },
{ name: 'form-group', link: 'reactive-form/form-group' },
{ name: 'form-builder', link: 'reactive-form/form-builder' },
{ name: 'form-builder-nested', link: 'reactive-form/form-builder-nested' },
{ name: 'form-array', link: 'reactive-form/form-array' },
{ name: 'form-multi', link: 'reactive-form/form-multi' },
]
},
{
name: 'Features', link: 'Features',
elements: [
{ name: 'charts', link: 'charts' },
{ name: 'leaflet', link: 'leaflet' },
{ name: 'movies-images-list', link: 'movies-images-list' },
{ name: 'httpclient', link: 'httpclient' },
{ name: 'template-driven-forms', link: 'template-driven-forms' },
{ name: 'components', link: 'components' },
{ name: 'services', link: 'services' }
]
},
{
name: 'CRUD', link: 'crud',
elements: [
{ name: 'continents', link: 'crud/continents' },
{ name: 'countries', link: 'crud/countries' },
{ name: 'cities', link: 'crud/cities' },
{ name: 'shows', link: 'crud/shows' },
{ name: 'movies', link: 'crud/movies' },
{ name: 'shows-images', link: 'crud/shows-images' },
{ name: 'movies-images', link: 'crud/movies-images' },
]
},
{
name: 'Typescript', link: 'typescript',
elements: [
{ name: 'modules', link: 'typescript/modules' },
{ name: 'interfaces', link: 'typescript/interfaces' },
{ name: 'classes', link: 'typescript/classes' },
{ name: 'functions', link: 'typescript/functions' },
{ name: 'types', link: 'typescript/types' },
{ name: 'typing-function', link: 'typescript/typing-function' },
]
},
{
name: 'bootstrap-prototype', link: 'bootstrap-prototype',
elements: [
{ name: 'alerts', link: 'bootstrap-prototype/alerts' },
{ name: 'badge', link: 'bootstrap-prototype/badge' },
{ name: 'blockquotes', link: 'bootstrap-prototype/blockquotes' },
{ name: 'breadcrumb', link: 'bootstrap-prototype/breadcrumb' },
{ name: 'buttons', link: 'bootstrap-prototype/buttons' },
{ name: 'carousel', link: 'bootstrap-prototype/carousel'},
{ name: 'collapse', link: 'bootstrap-prototype/collapse' },
{ name: 'dropdowns', link: 'bootstrap-prototype/dropdowns' },
{ name: 'forms', link: 'bootstrap-prototype/forms' },
{ name: 'list-group', link: 'bootstrap-prototype/list-group' },
{ name: 'modal', link: 'bootstrap-prototype/modal' },
{ name: 'pagination', link: 'bootstrap-prototype/pagination' },
{ name: 'popovers', link: 'bootstrap-prototype/popovers' },
{ name: 'progress', link: 'bootstrap-prototype/progress' },
{ name: 'spinners', link: 'bootstrap-prototype/spinners' },
]
},
];
constructor(
public router: Router,
public renderer: Renderer2) { }
onSelectMenu(link: any): void {
const element = document.getElementById('bd-docs-nav');
this.renderer.removeClass(element, 'show');
const route = '/' + link;
this.router.navigate([route]);
}
}