I want to refresh a page (through this.navigate.url) when a promise is executed but I can't seem to make it work.
import {Router} from '@angular/router';
constructor(public router: Router) {
}
myPromise('/api/users').then((response) => {
return response.json();
}).then(function (response) {
this.router.navigate.url([url]);
});
I even tried window.location.reload and it doesn't work either.