title: How to change a CSS class using Angular 7
body: <p>I am using <code>ngx-bootstrap's</code> modals and I want to change the CSS class <code>modal-dialog</code> with some other properties.</p>
  
  <p>My question is: How do I dynamically change the properties of for example this class in <code>Angular</code>?</p>
  
  <p>I have played around with <code>ElementRef</code>, <code>TemplateRef</code> and <code>Rendere2</code> but not found any solution.</p>
  
  <p>Thanks for you help in advance.</p>
  
  <p>EDIT 1:</p>
  
  <p>I am opening the modal using <code>BsModalService</code>, so my template looks like this:</p>
  
  <pre><code>&lt;ng-template #defaultModalTemplate&gt;
      Content
  &lt;/ng-template&gt;
  </code></pre>
  
  <p>I open the dialog like this:</p>
  
  <pre><code>public openModal(): void {
      this.modalRef = this.modalService.show(this.templateRef);
  
      if (this.renderer &amp;&amp; this.templateRef) { // trying to extract .modal-dialog here
  
      }
  }
  </code></pre>
  
  <p>the variable templateRef is defined like this:</p>
  
  <pre><code>@ViewChild('defaultModalTemplate') public templateRef?: TemplateRef&lt;any&gt;;
  </code></pre>