Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to make a component reload in angular

DeleteEmployee(id:number)
  {
    this.employeeService.deleteEmployee(id)
    .subscribe( 
      (data) =>{
        console.log(data);
        this.ngOnInit();
      }),
      err => {
        console.log("Error");
      }   
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #component #reload #angular
ADD COMMENT
Topic
Name
8+9 =