Migrating Omega Layout to primeng version 4.x

Post Reply
eescrihuela
Posts: 2
Joined: 30 Jun 2017, 14:06

04 Jul 2017, 15:05

Hi,
I am newbe to web programming,

I have tried to import primeng 4.x and change dependencies to this version in Omega Layout, and I have got a compilation problem.

In menu.component.ts, there is a class named AppSubMenu, who has a MunuItem attribute called item.

In version 2.x MenuItem had an attribute called eventEmitter of type EventEmitter that DOES NOT exists in version 4.x

How can I migrate Omega Layout to primeng version 4.X?

Thanks

Eduard Escrihuela

eescrihuela
Posts: 2
Joined: 30 Jun 2017, 14:06

05 Jul 2017, 13:05

Hi,
maybe this is not the correct answer, but changing this code I have run out of compilation problems.
The file is menu-component.ts and the class is AppSubmenu and the changed method is itemClick
OLD CODE:
===================================================
if(!item.eventEmitter) {
item.eventEmitter = new EventEmitter();
item.eventEmitter.subscribe(item.command);
}

item.eventEmitter.emit({
originalEvent: event,
item: item
});


NEW CODE:
====================
let eventEmitter = new EventEmitter();
eventEmitter.subscribe(item.command);

eventEmitter.emit({
originalEvent: event,
item: item
});


====================
As the new MenuItem definition has not an eventEmitter included, I presume defining an EventEmitter object out of the MenuDefinition.

I don't know if it is ok or not .

Thanks

Eduard Escrihuela

User avatar
DarthMaul
Posts: 583
Joined: 23 Nov 2015, 21:20

07 Jul 2017, 10:22

Hi ,

We will update all layouts to 4.2.x of angular and 4.1.x of primeng soon.

Regards

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest