primeng icon indicating copy to clipboard operation
primeng copied to clipboard

TabMenu Templating not working

Open CC84 opened this issue 7 years ago • 3 comments

[x ] bug report

https://stackblitz.com/edit/angular-hnheds

Current behavior When only importing TabMenuModule the templating is not working. TabMenuModule is missing an SharedModule export so pTemplate Directive is not known.

Expected behavior Templating should work.

Minimal reproduction of the problem with instructions https://stackblitz.com/edit/angular-hnheds

What is the motivation / use case for changing the behavior? Should work like documented.

Please tell us about your environment: not important

  • Angular version: 8.2.0

  • PrimeNG version: 8.0.2

  • Browser: all

  • Language: all

  • Node (for AoT issues): node --version = 10.x not important

CC84 avatar Aug 07 '19 08:08 CC84

Hi @CC84 , Seems to be your angular.json not correct (stackblitz demo). Can you create sample with https://stackblitz.com/github/primefaces/primeng-issue-template . Also you can look this working sample https://stackblitz.com/edit/github-fe5ykq

yigitfindikli avatar Sep 03 '19 07:09 yigitfindikli

No it's not an issue with the angular.json. It's an issue with an missing export. The sample you linked is working cause there are imported all prime modules. A lot of them are exporting the SharedModule and so fix the issue. But when you only import the TabMenuModule, there is no SharedModule Export and so pTemplate is missing. I've modified your working sample by just removing unneccessary imports: https://stackblitz.com/edit/github-fe5ykq-gvura4?file=src/app/app.module.ts => Templating ist no longer working.

I also tried to reproduce the issue with the issue-template, but there i wasn't able to get TabMenu working at all, maybe this is cause the referenced versions ( at least prime (8.0.0) and Angular (8.0.3) are rather old.

CC84 avatar Sep 03 '19 20:09 CC84

Thanks for the sample. Best Regards.

yigitfindikli avatar Sep 04 '19 08:09 yigitfindikli