Skip to content

Commit 4d7f248

Browse files
committed
Execute linter
1 parent 79423da commit 4d7f248

16 files changed

+15870
-233
lines changed

package-lock.json

Lines changed: 15674 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/app.component.css

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11

2-
32
.l-header {
4-
display: block;
3+
display: block;
54
}
65

76
main {
8-
padding-top: 50px;
9-
margin: 0 auto;
10-
width: 300px;
7+
padding-top: 50px;
8+
margin: 0 auto;
9+
width: 300px;
1110
}
1211

1312
.course-header {
14-
text-align: center;
15-
margin-top: 30px;
16-
margin-bottom: 30px;
13+
text-align: center;
14+
margin-top: 30px;
15+
margin-bottom: 30px;
1716
}
1817

1918
.course-header h3 {
20-
text-align: center;
21-
}
19+
text-align: center;
20+
}

src/app/app.component.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
21
<header class="l-header">
3-
<ul class="top-menu disable-link-styles">
4-
<li class="logo-small-container">
5-
<a class="v-center-block-parent">
6-
<img class="v-center-block logo-small angular-university-logo"
7-
src="https://angular-academy.s3.amazonaws.com/main-logo/main-page-logo-small-hat.png">
8-
</a>
9-
</li>
10-
<li>
11-
<a routerLink="/lessons">Lessons</a>
12-
</li>
13-
<li>
14-
<a routerLink="/signup">Sign Up</a>
15-
</li>
16-
<li>
17-
<a routerLink="/login">Login</a>
18-
</li>
19-
<li>
20-
<a>Logout</a>
21-
</li>
22-
</ul>
2+
<ul class="top-menu disable-link-styles">
3+
<li class="logo-small-container">
4+
<a class="v-center-block-parent">
5+
<img class="v-center-block logo-small angular-university-logo"
6+
src="https://angular-academy.s3.amazonaws.com/main-logo/main-page-logo-small-hat.png">
7+
</a>
8+
</li>
9+
<li>
10+
<a routerLink="/lessons">Lessons</a>
11+
</li>
12+
<li>
13+
<a routerLink="/signup">Sign Up</a>
14+
15+
</li>
16+
<li>
17+
<a routerLink="/login">Login</a>
18+
</li>
19+
<li>
20+
<a>Logout</a>
21+
</li>
22+
</ul>
2323

2424
</header>
2525

2626

2727
<main>
2828

29-
<div class="course-header">
30-
<h3>Angular Security MasterClass</h3>
31-
<img class="course-logo"
32-
src="https://s3-us-west-1.amazonaws.com/angular-university/course-images/angular-security-thumbnail.png">
33-
</div>
29+
<div class="course-header">
30+
<h3>Angular Security MasterClass</h3>
31+
<img class="course-logo"
32+
src="https://s3-us-west-1.amazonaws.com/angular-university/course-images/angular-security-thumbnail.png">
33+
</div>
3434

3535

36-
<router-outlet></router-outlet>
36+
<router-outlet></router-outlet>
3737

3838
</main>
3939

src/app/app.component.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from '@angular/core';
1+
import {Component} from '@angular/core';
22

33
@Component({
44
selector: 'app-root',
@@ -8,11 +8,4 @@ import { Component } from '@angular/core';
88
export class AppComponent {
99

1010

11-
12-
13-
14-
15-
16-
17-
1811
}

src/app/app.module.ts

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
import { BrowserModule } from '@angular/platform-browser';
2-
import { NgModule } from '@angular/core';
1+
import {BrowserModule} from '@angular/platform-browser';
2+
import {NgModule} from '@angular/core';
33
import {HttpClientModule} from '@angular/common/http';
44

5-
import { AppComponent } from './app.component';
6-
import { LessonsComponent } from './lessons/lessons.component';
7-
import { LoginComponent } from './login/login.component';
8-
import { SignupComponent } from './signup/signup.component';
9-
import {RouterModule} from "@angular/router";
10-
import {routesConfig} from "./routes.config";
11-
import {LessonsService} from "./services/lessons.service";
12-
import {ReactiveFormsModule} from "@angular/forms";
13-
5+
import {AppComponent} from './app.component';
6+
import {LessonsComponent} from './lessons/lessons.component';
7+
import {LoginComponent} from './login/login.component';
8+
import {SignupComponent} from './signup/signup.component';
9+
import {RouterModule} from '@angular/router';
10+
import {routesConfig} from './routes.config';
11+
import {LessonsService} from './services/lessons.service';
12+
import {ReactiveFormsModule} from '@angular/forms';
1413

1514

1615
@NgModule({
@@ -22,9 +21,9 @@ import {ReactiveFormsModule} from "@angular/forms";
2221
],
2322
imports: [
2423
BrowserModule,
25-
HttpClientModule,
26-
RouterModule.forRoot(routesConfig),
27-
ReactiveFormsModule
24+
HttpClientModule,
25+
RouterModule.forRoot(routesConfig),
26+
ReactiveFormsModule
2827
],
2928
providers: [LessonsService],
3029
bootstrap: [AppComponent]

src/app/common/forms.css

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11

22
form {
3-
width: 300px;
3+
width: 300px;
44
}
55

66
form label {
7-
width: 80px;
8-
text-align: right;
7+
width: 80px;
8+
text-align: right;
99
}
1010

1111
form input {
12-
border: 2px solid lightgray;
12+
border: 2px solid lightgray;
1313
}
1414

1515
.form-field {
16-
margin-bottom: 5px;
16+
margin-bottom: 5px;
1717
}
1818

1919
.form-buttons {
20-
margin-top: 10px;
21-
text-align: right;
20+
margin-top: 10px;
21+
text-align: right;
2222
}
2323

24-
.form-buttons button{
25-
width: 100%;
26-
}
24+
.form-buttons button {
25+
width: 100%;
26+
}

src/app/lessons/lessons.component.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
h2 {
3-
text-align: center;
4-
}
3+
text-align: center;
4+
}
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
1-
21
<h2>All Lessons</h2>
32

43
<div class="lessons-list-container v-h-center-block-parent">
54

6-
<table class="table lessons-list card card-strong">
7-
<tbody>
8-
<tr *ngFor="let lesson of lessons$ | async" [routerLink]="['/lessons', lesson.id]">
9-
<td class="lesson-title"> {{lesson.description}} </td>
10-
<td class="duration">
11-
<i class="md-icon duration-icon">access_time</i>
12-
<span>{{lesson.duration}}</span>
13-
</td>
14-
</tr>
15-
</tbody>
16-
</table>
5+
<table class="table lessons-list card card-strong">
6+
<tbody>
7+
<tr *ngFor="let lesson of lessons$ | async" [routerLink]="['/lessons', lesson.id]">
8+
<td class="lesson-title"> {{lesson.description}} </td>
9+
<td class="duration">
10+
<i class="md-icon duration-icon">access_time</i>
11+
<span>{{lesson.duration}}</span>
12+
</td>
13+
</tr>
14+
</tbody>
15+
</table>
1716

1817

19-
</div>
18+
</div>

src/app/lessons/lessons.component.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Component, OnInit } from '@angular/core';
2-
import {LessonsService} from "../services/lessons.service";
3-
import {Observable} from "rxjs";
4-
import {Lesson} from "../model/lesson";
1+
import {Component, OnInit} from '@angular/core';
2+
import {LessonsService} from '../services/lessons.service';
3+
import {Observable} from 'rxjs';
4+
import {Lesson} from '../model/lesson';
55

66
@Component({
7-
selector: 'lessons',
7+
selector: 'app-lessons',
88
templateUrl: './lessons.component.html',
99
styleUrls: ['./lessons.component.css']
1010
})
@@ -13,11 +13,12 @@ export class LessonsComponent implements OnInit {
1313

1414
lessons$: Observable<Lesson[]>;
1515

16-
constructor(private lessonsService:LessonsService) { }
16+
constructor(private lessonsService: LessonsService) {
17+
}
1718

1819
ngOnInit() {
1920

20-
this.lessons$ = this.lessonsService.loadAllLessons();
21+
this.lessons$ = this.lessonsService.loadAllLessons();
2122
}
2223

2324
}

src/app/login/login.component.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<form autocomplete="off" novalidate [formGroup]="form">
22

3-
<fieldset>
4-
<legend>Login</legend>
5-
<div class="form-field">
6-
<label>Email:</label>
7-
<input name="email" formControlName="email">
8-
</div>
9-
<div class="form-field">
10-
<label>Password:</label>
11-
<input name="password" formControlName="password" type="password">
12-
</div>
13-
</fieldset>
14-
15-
<div class="form-buttons">
16-
<button class="button button-primary" (click)="login()">Login</button>
3+
<fieldset>
4+
<legend>Login</legend>
5+
<div class="form-field">
6+
<label>Email:</label>
7+
<input name="email" formControlName="email">
8+
</div>
9+
<div class="form-field">
10+
<label>Password:</label>
11+
<input name="password" formControlName="password" type="password">
1712
</div>
13+
</fieldset>
14+
15+
<div class="form-buttons">
16+
<button class="button button-primary" (click)="login()">Login</button>
17+
</div>
1818

1919

20-
</form>
20+
</form>

src/app/login/login.component.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
import { Component, OnInit } from '@angular/core';
2-
import {FormBuilder, FormGroup, Validators} from "@angular/forms";
1+
import {Component, OnInit} from '@angular/core';
2+
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
33

44
@Component({
5-
selector: 'login',
5+
selector: 'app-login',
66
templateUrl: './login.component.html',
77
styleUrls: ['./login.component.css', '../common/forms.css']
88
})
99
export class LoginComponent implements OnInit {
1010

11-
form:FormGroup;
11+
form: FormGroup;
1212

13-
constructor(private fb:FormBuilder) {
13+
constructor(private fb: FormBuilder) {
1414

15-
this.form = this.fb.group({
16-
email: ['',Validators.required],
17-
password: ['',Validators.required]
18-
});
15+
this.form = this.fb.group({
16+
email: ['', Validators.required],
17+
password: ['', Validators.required]
18+
});
1919

20-
}
20+
}
2121

22-
ngOnInit() {
22+
ngOnInit() {
2323

24-
}
24+
}
2525

2626

27-
login() {
27+
login() {
2828

29-
const formValue = this.form.value;
29+
const formValue = this.form.value;
3030

31-
//TODO
31+
// TODO
3232

3333

34-
}
34+
}
3535

3636
}

src/app/model/lesson.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
2-
31
export interface Lesson {
4-
id:number;
5-
description:string;
6-
longDescription:string;
7-
tags:string;
8-
duration:string;
9-
url:string;
10-
videoUrl:string;
11-
}
2+
id: number;
3+
description: string;
4+
longDescription: string;
5+
tags: string;
6+
duration: string;
7+
url: string;
8+
videoUrl: string;
9+
}

0 commit comments

Comments
 (0)