Reputation: 153
is it possible to route like after an ajax call to another page? So I know it is possible inside html with Angular2 TS but does it work with Dart and how?
@RouteConfig(const [
const Route(path: '/search', name: 'Search', component: SearchComponent, useAsDefault: true),
const Route(path: '/create', name: 'Create', component: CreateComponent),
const Route(path: '/edit/:id', name: 'Edit', component: EditComponent)
])
Upvotes: 2
Views: 265
Reputation: 657248
Something like
MyComponent {
Router _router;
MyComponent(this._router);
makeHttpRequest() {
if(success) {
_router.navigate(['/Edit', { id: entry['articleId'] }])
}
}
}
depending on your concrete use case
Upvotes: 3