[ACA-3595] Fix broken extending navbar by using route id reference (#1505)

This commit is contained in:
arditdomi 2020-07-02 12:41:50 +01:00 committed by GitHub
parent b3a1d10c05
commit 4ac1b8d7dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -44,7 +44,7 @@ describe('ActionDirective', () => {
}); });
it('should navigate if action is route', () => { it('should navigate if action is route', () => {
directive.action = { route: 'dummy' }; directive.action = { url: 'dummy' };
directive.onClick(); directive.onClick();
expect(routeMock.navigate).toHaveBeenCalled(); expect(routeMock.navigate).toHaveBeenCalled();
}); });

View File

@ -37,8 +37,8 @@ export class ActionDirective {
@HostListener('click') @HostListener('click')
onClick() { onClick() {
if (this.action.route) { if (this.action.url) {
this.router.navigate(this.getNavigationCommands(this.action.route)); this.router.navigate(this.getNavigationCommands(this.action.url));
} else if (this.action.click) { } else if (this.action.click) {
this.store.dispatch({ this.store.dispatch({
type: this.action.click.action, type: this.action.click.action,