daily pastebin goal
88%
SHARE
TWEET

Untitled

a guest Jan 24th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. onProjectsFormSubmit() {
  2.     if (this.projectsForm.valid) {
  3.       this.errorEvent = false;
  4.       this.projectsService
  5.         .postProjectAdd(this.projectsForm.value)
  6.         .pipe(
  7.           takeUntil(this.destroy$)
  8.         )
  9.         .subscribe(() => {
  10.           this.translate
  11.             .get('alertify.success.projectAdd')
  12.             .pipe(
  13.               takeUntil(this.destroy$)
  14.             )
  15.             .subscribe(
  16.               translation => {
  17.                 this.alertify.success(translation);
  18.               });
  19.           this.router.navigate(['/projects/projects-list']);
  20.         },
  21.           () => { this.errorEvent = true; });
  22.     }
  23.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top