@sprw

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

Angular To doリスト作成

解決したいこと

AngularにてTodoアプリを作っています。
オブジェクトはnullである可能性がありますと表示されエラーが解決できません。
よろしければ教えていただけるとありがたいです。

onSaveTodoItem(): void {
const item: any = {
title: this.todoForm.get('title').value,
isComplete: false,
description: null,
date: null
};

if (this.hasDetail) {
item.description = this.todoForm.get('description').value;
item.date = this.todoForm.get('date').value;
}

this.itemList.push(item);
this.clearForm();
console.log(this.itemList);
}

Image from Gyazo
解決方法を教えて下さい。

0 likes

No Answers yet.

Your answer might help someone💌