This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div fxLayout="row" fxLayoutAlign="center center"> | |
<div fxLayout="column" fxFlex="60%"> | |
<mat-card> | |
<mat-card-title> | |
My Easy NGRX Todo List | |
</mat-card-title> | |
<mat-card-content fxLayout="column"> | |
<mat-form-field> | |
<input matInput placeholder="Add New Todo" #todoInput (keyup)="addTodo($event)"> | |
</mat-form-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ViewChild, ElementRef } from '@angular/core'; | |
import { v4 as uuid } from 'uuid'; | |
import { Todo } from './app.module'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Todo { | |
id: string; | |
text: string; | |
} | |
@NgModule({ | |
declarations: [AppComponent], | |
imports: [ | |
BrowserModule, | |
BrowserAnimationsModule, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div fxLayout="row" fxLayoutAlign="center center"> | |
<div fxLayout="column" fxFlex="60%"> | |
<mat-card> | |
<mat-card-title> | |
My Easy NGRX Todo List | |
</mat-card-title> | |
<mat-card-content fxLayout="column"> | |
<mat-form-field> | |
<input matInput placeholder="Add New Todo" #todoInput (keyup)="addTodo($event)"> | |
</mat-form-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div fxLayout="row" fxLayoutAlign="center center"> | |
<div fxLayout="column" fxFlex="60%"> | |
<mat-card> | |
<mat-card-title> | |
My Easy NGRX Todo List | |
</mat-card-title> | |
<mat-card-content fxLayout="column"> | |
<mat-form-field> | |
<input matInput placeholder="Add New Todo"> | |
</mat-form-field> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* You can add global styles to this file, and also import other style files */ | |
@import 'theme.scss'; | |
.mat-card { | |
margin: 10px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '~@angular/material/theming'; | |
@include mat-core(); | |
$amp-app-primary: mat-palette($mat-light-blue); | |
$amp-app-accent: mat-palette($mat-light-green); | |
$amp-app-warn: mat-palette($mat-red); | |
$amp-app-theme: mat-light-theme($amp-app-primary, $amp-app-accent, $amp-app-warn); | |
@include angular-material-theme($amp-app-theme); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
declarations: [AppComponent], | |
imports: [ | |
BrowserModule, | |
BrowserAnimationsModule, | |
FlexLayoutModule, | |
MatCardModule, | |
MatInputModule, | |
MatListModule, | |
], |
NewerOlder