refresh current component angular
reloadComponent() {
let currentUrl = this.router.url;
this.router.routeReuseStrategy.shouldReuseRoute = () => false;
this.router.onSameUrlNavigation = 'reload';
this.router.navigate([currentUrl]);
} reloadCurrentRoute() {
let currentUrl = this._router.url;
this._router.navigateByUrl('/', {skipLocationChange: true}).then(() => {
this._router.navigate([currentUrl]);
console.log(currentUrl);
});
}DeleteEmployee(id:number)
{
this.employeeService.deleteEmployee(id)
.subscribe(
(data) =>{
console.log(data);
this.ngOnInit();
}),
err => {
console.log("Error");
}
}
Also in JavaScript:
- installing node on ec2 instance
- jquery cast to string
- discord bot v12 reaction remove code
- callout react
- jquery select by data attribute
- android studio react native plugins
- import React, { memo } from 'react';
- how to smooth scroll in javascript
- oops in javascript
- adding numbers in an array javascript
- sass node sass loder
- filter in js
- javascript number format
- get channel id discord js v12
- check if array does not contain string js
- combine p5 with react
- just number regex
- removing first item array js
- javascript es6
- javascript range slider
- create server and connect to db and frontend
- jquery each has class
- js check if div have another div
- regex to check if string contains special characters javascript