# Ion-menu in custom component with contentId

**URL:** <https://forum.ionicframework.com/t/ion-menu-in-custom-component-with-contentid/198065>\
**Category:** Ionic Framework\
**Created:** [October 17, 2020, 4:40pm UTC](https://forum.ionicframework.com/t/ion-menu-in-custom-component-with-contentid/198065 "2020-10-17T16:40:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simbaclaw](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/simbaclaw/32/131958_2.png) [@Simbaclaw](https://forum.ionicframework.com/u/Simbaclaw)\
**Post date:** [October 17, 2020, 4:40pm UTC](https://forum.ionicframework.com/t/ion-menu-in-custom-component-with-contentid/198065/1 "2020-10-17T16:40:23Z")

</div>

Hi there,

I’m using ionic 5 and I want to use contentId with ion-router-outlet’s id attribute.  
However I put my ion-menu that has the contentId inside of a custom component.

How can I expose this contentId to the app’s ion-router-outlet?

I currently am getting the following two error messages in my console:

> Can’t bind to ‘routerLink’ since it isn’t a known property of ‘div’.  
> Menu: must have a “content” element to listen for drag events on.

---

<div class="post-metadata">

**Author:** ![Simbaclaw](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/simbaclaw/32/131958_2.png) [@Simbaclaw](https://forum.ionicframework.com/u/Simbaclaw)\
**Post date:** [October 17, 2020, 6:12pm UTC](https://forum.ionicframework.com/t/ion-menu-in-custom-component-with-contentid/198065/2 "2020-10-17T18:12:44Z")

</div>

> **[PurpleEdge2214/Ionic4-Side-Menu-as-a-Component---Example](https://github.com/PurpleEdge2214/Ionic4-Side-Menu-as-a-Component---Example)**
>
> Ionic 4 example of a side menu as a component. Contribute to PurpleEdge2214/Ionic4-Side-Menu-as-a-Component---Example development by creating an account on GitHub.

This helped me fix the issue I was having
