Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onProjectsFormSubmit() {
- if (this.projectsForm.valid) {
- this.errorEvent = false;
- this.projectsService
- .postProjectAdd(this.projectsForm.value)
- .pipe(
- takeUntil(this.destroy$)
- )
- .subscribe(() => {
- this.translate
- .get('alertify.success.projectAdd')
- .pipe(
- takeUntil(this.destroy$)
- )
- .subscribe(
- translation => {
- this.alertify.success(translation);
- });
- this.router.navigate(['/projects/projects-list']);
- },
- () => { this.errorEvent = true; });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement