- Angular used with Material & Tailwind components to display and add notes in a table
- Note: to open web links in a new window use: ctrl+click on link
- Simple Angular Material form with error-checking.
- Created notes are added to a Mat-Expansion Panel.
- Refreshing display loses added data
- Notes can be deleted (the edit button has no function linked to it so it does nothing)
npm i
to install dependenciesng serve
for a dev server. Navigate tohttp://localhost:4200/
. The app will automatically reload if you change any of the source files
notes-service.ts
function to add note to existing notes array. Uses??
nullish coalescing operator to create an id basd on the array length or use a fallback id of 1 (array empty)
addNote(title: string, description: string, body: string) {
const lastId: number = this.notes[this.notes.length - 1]?.id ?? 1;
const note: Note = {
id: lastId,
title: title,
description: description,
body: body,
};
this.notes.push(note);
this.notesUpdated.next([...this.notes]);
}
- Material components, use of nullish coalescing operator
- Status: Working
- To-Do: Add data store - database? navbar links. Replace deprecated flex-layout
- This project is licensed under the terms of the MIT license.
- Repo created by ABateman, email:
gomezbateman@yahoo.com