Skip to content

Commit 46a119a

Browse files
committed
migrate to latest Nx and Angular 19
1 parent 309b4ce commit 46a119a

File tree

31 files changed

+15124
-18934
lines changed

31 files changed

+15124
-18934
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { Component } from '@angular/core';
22

33
@Component({
4-
selector: 'app-root',
5-
template: `
4+
selector: 'app-root',
5+
template: `
66
<app-header></app-header>
77
<router-outlet></router-outlet>
88
`,
9-
styles: [
10-
`
9+
styles: [
10+
`
1111
:host {
1212
display: block;
1313
max-width: var(--screen-width);
@@ -16,6 +16,7 @@ import { Component } from '@angular/core';
1616
box-sizing: border-box;
1717
}
1818
`,
19-
],
19+
],
20+
standalone: false
2021
})
2122
export class AppComponent {}

apps/ng-demo/src/components/article-card/article-card.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import { Article } from '../../models/articles';
77
import { DateagoPipe } from '../../pipes/dateago.pipe';
88

99
@Component({
10-
selector: 'app-article-card',
11-
templateUrl: './article-card.component.html',
12-
styleUrls: ['./article-card.component.scss'],
10+
selector: 'app-article-card',
11+
templateUrl: './article-card.component.html',
12+
styleUrls: ['./article-card.component.scss'],
13+
standalone: false
1314
})
1415
export class ArticleCardComponent implements OnChanges {
1516
@Input() article!: Article;

apps/ng-demo/src/components/header/header.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ import { Component, NgModule } from '@angular/core';
33
import { RouterModule } from '@angular/router';
44

55
@Component({
6-
selector: 'app-header',
7-
templateUrl: './header.component.html',
8-
styleUrls: ['./header.component.scss'],
6+
selector: 'app-header',
7+
templateUrl: './header.component.html',
8+
styleUrls: ['./header.component.scss'],
9+
standalone: false
910
})
1011
export class HeaderComponent {
1112
constructor() {}
@@ -16,4 +17,4 @@ export class HeaderComponent {
1617
imports: [CommonModule, RouterModule.forChild([])],
1718
exports: [HeaderComponent],
1819
})
19-
export class HeaderModule {}
20+
export class HeaderModule {}

apps/ng-demo/src/components/scoll-tracker/scroll-tracker.directive.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import { fromEvent, Subscription } from 'rxjs';
99
import { debounceTime } from 'rxjs/operators';
1010

1111
@Directive({
12-
/* eslint-disable @angular-eslint/directive-selector */
13-
selector: '[scrollTracker]',
12+
/* eslint-disable @angular-eslint/directive-selector */
13+
selector: '[scrollTracker]',
14+
standalone: false
1415
})
1516
export class ScrollTrackerDirective implements OnDestroy, OnInit {
1617
@Output() scrollingFinished = new EventEmitter<void>();

apps/ng-demo/src/pages/article-detail/article-detail.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import { UserStore } from '../../state/user.store';
77
import { UserArticlesStore } from '../../state/user-articles.store';
88

99
@Component({
10-
selector: 'app-article-detail',
11-
template: `
10+
selector: 'app-article-detail',
11+
template: `
1212
<aside>
1313
<app-reactions
1414
*ngIf="reaction$ | async as reactions"
@@ -25,8 +25,8 @@ import { UserArticlesStore } from '../../state/user-articles.store';
2525
<app-user-detail *ngIf="user" [user]="user"></app-user-detail>
2626
</ng-container>
2727
`,
28-
styles: [
29-
`
28+
styles: [
29+
`
3030
:host {
3131
display: grid;
3232
grid-gap: 1rem;
@@ -37,8 +37,9 @@ import { UserArticlesStore } from '../../state/user-articles.store';
3737
grid-template-columns: 4rem minmax(0, 7fr) minmax(0, 3fr);
3838
}
3939
`,
40-
],
41-
viewProviders: [ArticleDetailStore, UserStore, CommentsStore],
40+
],
41+
viewProviders: [ArticleDetailStore, UserStore, CommentsStore],
42+
standalone: false
4243
})
4344
export class ArticleDetailComponent implements OnInit {
4445
article$ = this.articleDetailStore.article$.pipe(

apps/ng-demo/src/pages/article-detail/article/article-details/article-details.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Component, Input } from '@angular/core';
22
import { ArticleDetails } from '../../../../models/articles';
33

44
@Component({
5-
selector: 'app-article-details',
6-
template: `
5+
selector: 'app-article-details',
6+
template: `
77
<article class="card article mb-4">
88
<header>
99
<div class="article-cover" *ngIf="article.cover_image">
@@ -64,8 +64,8 @@ import { ArticleDetails } from '../../../../models/articles';
6464
></app-comments-tree>
6565
</article>
6666
`,
67-
styles: [
68-
`
67+
styles: [
68+
`
6969
:host {
7070
border-radius: 5px;
7171
background-color: #fff;
@@ -143,7 +143,8 @@ import { ArticleDetails } from '../../../../models/articles';
143143
}
144144
}
145145
`,
146-
],
146+
],
147+
standalone: false
147148
})
148149
export class ArticleDetailsComponent {
149150
@Input() article!: ArticleDetails;

apps/ng-demo/src/pages/article-detail/article/comments-tree/comments-tree.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { Component, Input } from '@angular/core';
22
import { CommentsStore } from '../services/comments.store';
33

44
@Component({
5-
selector: 'app-comments-tree',
6-
template: `
5+
selector: 'app-comments-tree',
6+
template: `
77
<header class="flex justify-between">
88
<h2>
99
Discussion <span>({{ commentsCount }})</span>
@@ -14,16 +14,17 @@ import { CommentsStore } from '../services/comments.store';
1414
<app-comments [comments]="comments"></app-comments>
1515
</div>
1616
`,
17-
styles: [
18-
`
17+
styles: [
18+
`
1919
:host {
2020
display: block;
2121
app-comments {
2222
padding-left: 1.75rem;
2323
}
2424
}
2525
`,
26-
],
26+
],
27+
standalone: false
2728
})
2829
export class CommentsTreeComponent {
2930
@Input() commentsCount = 0;

apps/ng-demo/src/pages/article-detail/article/comments/comments.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { ChangeDetectorRef, Component, Input } from '@angular/core';
22
import { Comment } from '../../../../models/comment';
33

44
@Component({
5-
selector: 'app-comments',
6-
template: `
5+
selector: 'app-comments',
6+
template: `
77
<details
88
#commentsSec
99
(toggle)="cdRef.detectChanges()"
@@ -72,16 +72,17 @@ import { Comment } from '../../../../models/comment';
7272
></app-comments>
7373
</details>
7474
`,
75-
styles: [
76-
`
75+
styles: [
76+
`
7777
:host {
7878
display: block;
7979
app-comments {
8080
padding-left: 1.75rem;
8181
}
8282
}
8383
`,
84-
],
84+
],
85+
standalone: false
8586
})
8687
export class CommentsComponent {
8788
@Input() comments: Comment[] = [];

apps/ng-demo/src/pages/article-detail/article/reactions/reactions.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { Component, Input, OnInit } from '@angular/core';
22
import { Reaction } from '../../../../models/reaction-data';
33

44
@Component({
5-
selector: 'app-reactions',
6-
templateUrl: './reactions.component.html',
7-
styles: [
8-
`
5+
selector: 'app-reactions',
6+
templateUrl: './reactions.component.html',
7+
styles: [
8+
`
99
:host {
1010
display: grid;
1111
gap: 1.5rem;
@@ -45,7 +45,8 @@ import { Reaction } from '../../../../models/reaction-data';
4545
fill: currentColor;
4646
}
4747
`,
48-
],
48+
],
49+
standalone: false
4950
})
5051
export class ReactionsComponent {
5152
@Input() reactions: Reaction[] = [];

apps/ng-demo/src/pages/article-detail/user/user-articles/user-articles.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { ArticleDetailStore } from '../../article/services/article-detail.store'
44
import { UserArticlesStore } from '../../../../state/user-articles.store';
55

66
@Component({
7-
selector: 'app-user-articles',
8-
template: `
7+
selector: 'app-user-articles',
8+
template: `
99
<ng-container *ngIf="userArticles$ | async as articles">
1010
<section>
1111
<header class="flex align-center">
@@ -30,8 +30,8 @@ import { UserArticlesStore } from '../../../../state/user-articles.store';
3030
</section>
3131
</ng-container>
3232
`,
33-
styles: [
34-
`
33+
styles: [
34+
`
3535
header {
3636
padding: 0.75rem 1rem;
3737
border-bottom: 1px solid #fbfcff;
@@ -98,7 +98,8 @@ import { UserArticlesStore } from '../../../../state/user-articles.store';
9898
display: inline;
9999
}
100100
`,
101-
],
101+
],
102+
standalone: false
102103
})
103104
export class UserArticlesComponent {
104105
@Input() name = '';

0 commit comments

Comments
 (0)