We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f69262 commit bb3b8abCopy full SHA for bb3b8ab
src/app/create-course/create-course-step-1/create-course-step-1.component.ts
@@ -44,6 +44,19 @@ export class CreateCourseStep1Component implements OnInit {
44
45
this.courseCategories$ = this.courses.findCourseCategories();
46
47
+ const draft = localStorage.getItem("STEP_1");
48
+
49
+ if (draft) {
50
+ this.form.setValue(JSON.parse(draft));
51
+ }
52
53
+ this.form.valueChanges
54
+ .pipe(
55
+ filter(() => this.form.valid)
56
+ )
57
+ .subscribe( val => localStorage.setItem("STEP_1", JSON.stringify(val)));
58
59
60
}
61
62
get courseTitle() {
0 commit comments