import { Component,Input, Output, EventEmitter } from '@angular/core'; import { Note }…
- User
import { Component,Input, Output, EventEmitter } from '@angular/core'; import { Note } from '../../interfaces/note'; import { MarkdownModule, MarkdownService } from 'ngx-markdown'; import { NgSwitch, NgSwitchCase } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; @Component({ selector: 'app-note', imports: [NgSwitchCase,NgSwitch,FormsModule, MarkdownModule,BrowserModule], templateUrl: './note.component.html', styleUrl: './note.component.scss' }) export class NoteComponent { @Input() noteId!: string; @Input() noteTitle!: string; @Input() noteContent!: string; editMode: boolean = false; viewMode: boolean = false; constructor(private markdownService: MarkdownService) {}
toggleViewMode() { this.viewMode = !this.viewMode; } toggleEditMode() { this.editMode = !this.editMode; }
applyChanges(newContent: string) {
console.log(newContent);} } напиши отображение с помощью этого модуля заметок нескольких заметок которые ты получишь с помощью метода api.getNotes. он вернет заметки в формате: { "notes": [ { "content": "content for note 0", "id": 1, "title": "note№ 0" }, { "content": "content for note 1", "id": 2, "title": "note№ 1" }, { "content": "content for note 2", "id": 3, "title": "note№ 2" }, { "content": "content for note 3", "id": 4, "title": "note№ 3" }, { "content": "content for note 4", "id": 5, "title": "note№ 4" }, { "content": "content for note 5", "id": 6, "title": "note№ 5" }, { "content": "content for note 6", "id": 7, "title": "note№ 6" }, { "content": "content for note 7", "id": 8, "title": "note№ 7" }, { "content": "content for note 8", "id": 9, "title": "note№ 8" }, { "content": "content for note 9", "id": 10, "title": "note№ 9" }, { "content": "content for note 10", "id": 11, "title": "note№ 10" }, { "content": "content for note 11", "id": 12, "title": "note№ 11" }, { "content": "content for note 12", "id": 13, "title": "note№ 12" }, { "content": "content for note 13", "id": 14, "title": "note№ 13" }, { "content": "content for note 14", "id": 15, "title": "note№ 14" }, { "content": "content for note 15", "id": 16, "title": "note№ 15" }, { "content": "content for note 16", "id": 17, "title": "note№ 16" }, { "content": "content for note 17", "id": 18, "title": "note№ 17" }, { "content": "content for note 18", "id": 19, "title": "note№ 18" }, { "content": "content for note 19", "id": 20, "title": "note№ 19" } ] }
- Assistant
- User
ERROR NullInjectorError: R3InjectorError(Standalone[_DashboardComponent])[InjectionToken SECURITY_CONTEXT -> InjectionToken SECURITY_CONTEXT -> InjectionToken SECURITY_CONTEXT]: NullInjectorError: No provider for InjectionToken SECURITY_CONTEXT! Angular 6 get get get get get lookupTokenUsingModuleInjector
- Assistant