Skip to content

Commit

Permalink
Merge pull request #305 from loiane/chore-ng-update-91e62b7
Browse files Browse the repository at this point in the history
  • Loading branch information
loiane authored Nov 22, 2024
2 parents 3501902 + d90b983 commit f4f4594
Show file tree
Hide file tree
Showing 10 changed files with 6,684 additions and 4,692 deletions.
11,220 changes: 6,609 additions & 4,611 deletions crud-angular/package-lock.json

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions crud-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^18.2.8",
"@angular/cdk": "^18.2.8",
"@angular/common": "^18.2.8",
"@angular/compiler": "^18.2.8",
"@angular/core": "^18.2.8",
"@angular/forms": "^18.2.8",
"@angular/material": "^18.2.8",
"@angular/platform-browser": "^18.2.8",
"@angular/platform-browser-dynamic": "^18.2.8",
"@angular/router": "^18.2.8",
"@angular/youtube-player": "^18.2.8",
"@angular/animations": "^19.0.0",
"@angular/cdk": "^19.0.0",
"@angular/common": "^19.0.0",
"@angular/compiler": "^19.0.0",
"@angular/core": "^19.0.0",
"@angular/forms": "^19.0.0",
"@angular/material": "^19.0.0",
"@angular/platform-browser": "^19.0.0",
"@angular/platform-browser-dynamic": "^19.0.0",
"@angular/router": "^19.0.0",
"@angular/youtube-player": "^19.0.0",
"rxjs": "~7.8.1",
"tslib": "^2.7.0",
"zone.js": "~0.14.10"
"zone.js": "~0.15.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^18.2.8",
"@angular/cli": "~18.2.8",
"@angular/compiler-cli": "^18.2.8",
"@angular-devkit/build-angular": "^19.0.1",
"@angular/cli": "~19.0.1",
"@angular/compiler-cli": "^19.0.0",
"@types/jasmine": "~5.1.4",
"jasmine-core": "~5.3.0",
"karma": "~6.4.4",
Expand Down
7 changes: 3 additions & 4 deletions crud-angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ import { MatToolbarModule } from '@angular/material/toolbar';
import { RouterLink, RouterOutlet } from '@angular/router';

@Component({
selector: 'app-root',
standalone: true,
imports: [MatToolbarModule, RouterLink, RouterOutlet],
template: `
selector: 'app-root',
imports: [MatToolbarModule, RouterLink, RouterOutlet],
template: `
<mat-toolbar color="primary">
<h1 [routerLink]="['/']" style="cursor: pointer;">Courses App</h1>
</mat-toolbar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@ import { Lesson } from '../../model/lesson';
import { YouTubePlayerModule } from '@angular/youtube-player';

@Component({
selector: 'app-course-view',
templateUrl: './course-view.component.html',
styleUrls: ['./course-view.component.scss'],
standalone: true,
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
NgIf,
NgFor,
MatSidenavModule,
MatButtonModule,
MatListModule,
YouTubePlayerModule
],
schemas: [NO_ERRORS_SCHEMA]
selector: 'app-course-view',
templateUrl: './course-view.component.html',
styleUrls: ['./course-view.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
NgIf,
NgFor,
MatSidenavModule,
MatButtonModule,
MatListModule,
YouTubePlayerModule
],
schemas: [NO_ERRORS_SCHEMA]
})
export class CourseViewComponent implements OnInit, AfterViewInit {
course!: Course;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import { MatIconModule } from '@angular/material/icon';
import { MatTableModule } from '@angular/material/table';

@Component({
selector: 'app-courses-list',
templateUrl: './courses-list.component.html',
styleUrls: ['./courses-list.component.scss'],
standalone: true,
imports: [MatTableModule, MatIconModule, MatButtonModule, CategoryPipe]
selector: 'app-courses-list',
templateUrl: './courses-list.component.html',
styleUrls: ['./courses-list.component.scss'],
imports: [MatTableModule, MatIconModule, MatButtonModule, CategoryPipe]
})
export class CoursesListComponent {
@Input() courses: Course[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,24 @@ import { ErrorDialogComponent } from './../../../shared/components/error-dialog/
import { FormUtilsService } from './../../../shared/services/form-utils.service';

@Component({
selector: 'app-course-form',
templateUrl: './course-form.component.html',
styleUrls: ['./course-form.component.scss'],
standalone: true,
imports: [
MatCardModule,
MatToolbarModule,
ReactiveFormsModule,
MatFormFieldModule,
MatInputModule,
NgIf,
MatSelectModule,
MatOptionModule,
MatButtonModule,
MatIconModule,
MatSnackBarModule,
MatDialogModule,
NgFor
]
selector: 'app-course-form',
templateUrl: './course-form.component.html',
styleUrls: ['./course-form.component.scss'],
imports: [
MatCardModule,
MatToolbarModule,
ReactiveFormsModule,
MatFormFieldModule,
MatInputModule,
NgIf,
MatSelectModule,
MatOptionModule,
MatButtonModule,
MatIconModule,
MatSnackBarModule,
MatDialogModule,
NgFor
]
})
export class CourseFormComponent implements OnInit {
form!: FormGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@ import { CoursePage } from '../../model/course-page';
import { CoursesService } from '../../services/courses.service';

@Component({
selector: 'app-courses',
templateUrl: './courses.component.html',
styleUrls: ['./courses.component.scss'],
standalone: true,
imports: [
MatCardModule,
MatToolbarModule,
NgIf,
CoursesListComponent,
MatProgressSpinnerModule,
MatSnackBarModule,
MatDialogModule,
MatPaginatorModule,
AsyncPipe
]
selector: 'app-courses',
templateUrl: './courses.component.html',
styleUrls: ['./courses.component.scss'],
imports: [
MatCardModule,
MatToolbarModule,
NgIf,
CoursesListComponent,
MatProgressSpinnerModule,
MatSnackBarModule,
MatDialogModule,
MatPaginatorModule,
AsyncPipe
]
})
export class CoursesComponent implements OnInit {
courses$: Observable<CoursePage> | null = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import { MatButtonModule } from '@angular/material/button';
import { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';

@Component({
selector: 'app-confirmation-dialog',
standalone: true,
imports: [CommonModule, MatDialogModule, MatButtonModule],
template: `
selector: 'app-confirmation-dialog',
imports: [CommonModule, MatDialogModule, MatButtonModule],
template: `
<div mat-dialog-content>
<p>{{ data }}</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import { MatButtonModule } from '@angular/material/button';
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';

@Component({
selector: 'app-error-dialog',
standalone: true,
imports: [CommonModule, MatDialogModule, MatButtonModule],
template: `
selector: 'app-error-dialog',
imports: [CommonModule, MatDialogModule, MatButtonModule],
template: `
<h1 mat-dialog-title style="color: red;">Error!</h1>
<div mat-dialog-content>{{ data }}</div>
<div mat-dialog-actions align="center">
Expand Down
3 changes: 2 additions & 1 deletion crud-angular/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat.core();
@include mat.elevation-classes();
@include mat.app-background();

// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
Expand Down

0 comments on commit f4f4594

Please sign in to comment.