title: How to pass value from ts file to scss file in same component in angular 2+?
body: <p>This is my component</p>
  
  <pre><code>export class myComponent implements onInit {
  
  private outageCount;
  
  ngOnInit(){
  
      ....subscribe((data) =&gt; {
      this.outageCount = Object.keys(data).length;
  
  })
  }
  </code></pre>
  
  <p>I need to pass the outageCount to my css before <code>CONTENT</code></p>
  
  <pre><code>:host ::ng-deep app-settings-panel {
      &amp;:before{
          //content:"4";
          content:attr(outageCount);
          background: #941313;
          position: absolute;
          top: 3px;
          left: 22px;
          border-radius: 50%;
          height: 13px;
          width: 13px;
          border: 1px solid #ffffff;
          color: white;
          font-size: 8px;
          text-align: center;
          line-height: 13px;
      }
  </code></pre>
  
  <p>How can i pass the outageCount value from my component to css :before <code>content</code>.</p>
  
  <p>Any suggestions would be appreciated!</p>