Page 1 of 1

Migrating Omega Layout to primeng version 4.x

Posted: 04 Jul 2017, 15:05
by eescrihuela
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

Re: Migrating Omega Layout to primeng version 4.x

Posted: 05 Jul 2017, 13:05
by eescrihuela
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

Re: Migrating Omega Layout to primeng version 4.x

Posted: 07 Jul 2017, 10:22
by DarthMaul
Hi ,

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

Regards