Skip to content

Commit 0b02d55

Browse files
committed
chore: apply consistent formatting across project files and configurations
1 parent eccc4e6 commit 0b02d55

14 files changed

Lines changed: 1530 additions & 1547 deletions

File tree

angular.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@
8585
"input": "projects/ngx-cookie-service-ssr-demo/public"
8686
}
8787
],
88-
"styles": [
89-
"projects/ngx-cookie-service-ssr-demo/src/styles.scss"
90-
],
88+
"styles": ["projects/ngx-cookie-service-ssr-demo/src/styles.scss"],
9189
"server": "projects/ngx-cookie-service-ssr-demo/src/main.server.ts",
9290
"outputMode": "server",
9391
"ssr": {

pnpm-lock.yaml

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

projects/ngx-cookie-service-ssr-demo/src/app/app.routes.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { RenderMode, ServerRoute } from '@angular/ssr';
33
export const serverRoutes: ServerRoute[] = [
44
{
55
path: '**',
6-
renderMode: RenderMode.Server
7-
}
6+
renderMode: RenderMode.Server,
7+
},
88
];

projects/ngx-cookie-service-ssr-demo/src/app/guards/user-guard.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { ActivatedRouteSnapshot, CanActivateFn, Router, RouterStateSnapshot } fr
33
import { AuthService } from '../service/auth.service';
44

55
export const UserGuard: CanActivateFn = (next: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
6-
const router = inject(Router);
7-
const authService = inject(AuthService);
6+
const router = inject(Router);
7+
const authService = inject(AuthService);
88

9-
if (authService.isUserLoggedIn()) {
10-
return true;
11-
} else {
12-
router.navigateByUrl('/login');
13-
}
14-
return false;
9+
if (authService.isUserLoggedIn()) {
10+
return true;
11+
} else {
12+
router.navigateByUrl('/login');
13+
}
14+
return false;
1515
};

projects/ngx-cookie-service-ssr-demo/src/app/home/home.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class HomeComponent implements OnInit {
2424

2525
ngOnInit(): void {
2626
if (isPlatformServer(this.platformId)) {
27-
this.cookieService.set('server-cookie', crypto.randomUUID());
27+
this.cookieService.set('server-cookie', crypto.randomUUID());
2828
}
2929

3030
this.token = this.cookieService.get('token');

projects/ngx-cookie-service-ssr-demo/src/app/login/login.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@
33
<h2>Login</h2>
44
<mat-form-field appearance="fill" class="example-full-width">
55
<mat-label>Username</mat-label>
6-
<input [formField]="loginForm.username" matInput placeholder="Enter Username"/>
6+
<input [formField]="loginForm.username" matInput placeholder="Enter Username" />
77
<mat-error>Username is required</mat-error>
88
</mat-form-field>
99

10-
<br/>
10+
<br />
1111
<mat-form-field appearance="fill" class="example-full-width">
1212
<mat-label>Password</mat-label>
13-
<input [formField]="loginForm.password" matInput placeholder="Enter Password"/>
13+
<input [formField]="loginForm.password" matInput placeholder="Enter Password" />
1414
<mat-error>Password is required</mat-error>
1515
</mat-form-field>
16-
<br/>
16+
<br />
1717
<strong>Hint: Enter any username/password to login</strong>
18-
<br/>
19-
<br/>
18+
<br />
19+
<br />
2020
<button color="primary" matButton="filled" type="submit">Login</button>
2121
</form>
2222
</div>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export interface User {
2-
firstName: string;
3-
lastName: string;
2+
firstName: string;
3+
lastName: string;
44
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<!doctype html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<title>NgxCookieServiceSsrDemo</title>
6-
<base href="/">
7-
<meta name="viewport" content="width=device-width, initial-scale=1">
8-
<link rel="icon" type="image/x-icon" href="favicon.ico">
9-
<link rel="preconnect" href="https://fonts.googleapis.com">
10-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11-
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
12-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
13-
</head>
14-
<body>
15-
<app-root></app-root>
16-
</body>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>NgxCookieServiceSsrDemo</title>
6+
<base href="/" />
7+
<meta content="width=device-width, initial-scale=1" name="viewport" />
8+
<link href="favicon.ico" rel="icon" type="image/x-icon" />
9+
<link href="https://fonts.googleapis.com" rel="preconnect" />
10+
<link crossorigin href="https://fonts.gstatic.com" rel="preconnect" />
11+
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet" />
12+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
13+
</head>
14+
<body>
15+
<app-root></app-root>
16+
</body>
1717
</html>

projects/ngx-cookie-service-ssr-demo/src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ import { bootstrapApplication } from '@angular/platform-browser';
22
import { appConfig } from './app/app.config';
33
import { App } from './app/app';
44

5-
bootstrapApplication(App, appConfig)
6-
.catch((err) => console.error(err));
5+
bootstrapApplication(App, appConfig).catch((err) => console.error(err));

projects/ngx-cookie-service-ssr-demo/src/styles.scss

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Include theming for Angular Material with `mat.theme()`.
32
// This Sass mixin will define CSS variables that are used for styling Angular Material
43
// components according to the Material 3 design spec.
@@ -8,14 +7,16 @@
87

98
html {
109
height: 100%;
11-
@include mat.theme((
12-
color: (
13-
primary: mat.$azure-palette,
14-
tertiary: mat.$blue-palette,
15-
),
16-
typography: Roboto,
17-
density: 0,
18-
));
10+
@include mat.theme(
11+
(
12+
color: (
13+
primary: mat.$azure-palette,
14+
tertiary: mat.$blue-palette,
15+
),
16+
typography: Roboto,
17+
density: 0,
18+
)
19+
);
1920
}
2021

2122
body {
@@ -35,4 +36,5 @@ body {
3536
margin: 0;
3637
height: 100%;
3738
}
39+
3840
/* You can add global styles to this file, and also import other style files */

0 commit comments

Comments
 (0)