title: Angular 5: Use ngClass to switch classes for mobile and desktop views
body: <p>My application uses these classes: "<strong>large-screen</strong>" for desktop view and "<strong>small-screen</strong>" for mobile view. I am trying to use <strong>ngClass</strong> so I can switch between these classes <strong>in the container or wrapper div</strong> for various components but all of my implementations don't seem to work.</p>
  
  <p>Requirement is to switch to "large-screen" for desktop view and switch to "small-screen" for mobile view.
  Below are the media queries already in place.</p>
  
  <pre><code>@media only screen and (max-width: 415px) {
    .large-screen {
      display: none;
    }
  }
  @media only screen and (min-width: 415px) {
    .small-screen {
      display: none;
    }
  }
  </code></pre>
  
  <p>If anyone could suggest something different would be really appreciated.</p>