mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACA-3595] Fix broken extending navbar by using route id reference (#1505)
This commit is contained in:
parent
b3a1d10c05
commit
4ac1b8d7dd
@ -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();
|
||||||
});
|
});
|
||||||
|
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user