# Zoom Component inside another Component is not working

**URL:** <https://devforum.zoom.us/t/zoom-component-inside-another-component-is-not-working/45276>\
**Category:** Web\
**Created:** [March 9, 2021, 8:47pm UTC](https://devforum.zoom.us/t/zoom-component-inside-another-component-is-not-working/45276 "2021-03-09T20:47:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhruv\_Chopra](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@Dhruv\_Chopra](https://devforum.zoom.us/u/Dhruv_Chopra)\
**Post date:** [March 9, 2021, 8:47pm UTC](https://devforum.zoom.us/t/zoom-component-inside-another-component-is-not-working/45276/1 "2021-03-09T20:47:36Z")

</div>

**Description**  
I have created the angular component of zoom sdk (client sdk). added that component into .module.ts  
I am trying to access this zoom component into another component, but while accessing this zoom component into another component load first instead of parent component.

for eg. I have Parent angular component **A.html**

> \< html \>  
> //html code for…  
> added component  
> \</ html \>

**Zoom component html page**

> \<button (click)=“getSignature()”\>Join Meeting

**Zoom component .ts file**  
` import { ZoomMtg } from '@zoomus/websdk';`

```
ZoomMtg.preLoadWasm();
ZoomMtg.prepareJssdk();

@Component({
  selector: 'zoom-meeting',
  templateUrl: './zoommeeting.component.html',
  styleUrls: ['./zoommeeting.component.scss']
})
export class ZoomMeetingComponent implements OnInit {
constructor(public httpClient: HttpClient,){
// **nothing is initialize in the constructor but this child constructor called first instead of showing the A.html component** 
}

//signatureEndpoint = 'https://zoommeeting-1.herokuapp.com/'
apiKey = 'apiKey '
meetingNumber = 'meetingNumber '
role = '0'
apiSecret = 'apiSecret '
leaveUrl = 'http://localhost:4200'
userName = 'Angular'
userEmail = ''
passWord = ''
ngOnInit() {}
getSignature() {
    debugger;
    this.httpClient.post(this.signatureEndpoint, {
      meetingNumber: this.meetingNumber,
      role: this.role
    }).toPromise().then((data: any) => {
      if(data.signature) {
        console.log(data.signature)
        this.startMeeting(data.signature)
      } else {
        console.log(data)
      }
    }).catch((error) => {
      console.log(error)
    })
  }

  startMeeting(signature :any) {
debugger
    document.getElementById('zmmtg-root').style.display = 'block'
    ZoomMtg.init({
      leaveUrl: this.leaveUrl,
      isSupportAV: true,
      success: (success :any) => {
        console.log(success)
        ZoomMtg.join({
          signature: signature,
          meetingNumber: this.meetingNumber,
          userName: this.userName,
          apiKey: this.apiKey,
          userEmail: this.userEmail,
          passWord: this.passWord,
          success: (success :any) => {
            console.log(success)
          },
          error: (error :any) => {
            console.log(error)
          }
        })
      },
      error: (error :any) => {
        console.log(error)
      }
    })
  }
}

```

**A-request.module.ts**

> @NgModule({
> 
> declarations: [  
> A-Component  
> ZoomMeetingComponent  
> ]  
> })

**Error**  
No Error

**Which Client Web SDK version?**  
version. [1.9.0]

**To Reproduce(If applicable)**  
ZoomMeetingComponent inside another component invoking the first instead of showing the A.html page.

- In the A.html page I haved called the \< zoom-meeting \>\</ zoom-meeting\> so its not showing me A.html its directly loading the zoom component.

---

<div class="post-metadata">

**Author:** ![Dhruv\_Chopra](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@Dhruv\_Chopra](https://devforum.zoom.us/u/Dhruv_Chopra)\
**Post date:** [March 9, 2021, 9:02pm UTC](https://devforum.zoom.us/t/zoom-component-inside-another-component-is-not-working/45276/2 "2021-03-09T21:02:14Z")

</div>

I am able to solved this issue. Sorry to bother you… 🙂

#zmmtg-root {  
display: none;  
}

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [March 10, 2021, 9:13pm UTC](https://devforum.zoom.us/t/zoom-component-inside-another-component-is-not-working/45276/3 "2021-03-10T21:13:24Z")

</div>

Hey @Dhruv_Chopra,

Not to worry, you didn’t both us at all 🙂

I’m glad to hear that you were able to resolve your issue!

Max

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 10, 2021, 7:13am UTC](https://devforum.zoom.us/t/zoom-component-inside-another-component-is-not-working/45276/4 "2021-04-10T07:13:39Z")

</div>

Closed on April 10, 2021, 7:13am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
