title: angular2: how to manually add css files by condition to index.html?
body: <p>The below code is that define for style.</p>
  
  <pre><code>&lt;!-- for mobile --&gt;
  &lt;link rel="stylesheet" href="/dist/css/mobile.css"&gt;
  
  &lt;!-- for desktop --&gt;    
  &lt;link rel="stylesheet" href="/dist/css/desktop.css"&gt;
  </code></pre>
  
  <p>I want to add above files to &lt;head&gt; in 'src/index.html' by condition.</p>
  
  <p>How can I apply a css file for each device?</p>
  
  <p>As you know, I can't use 'Conditional' code in 'index.html'.</p>
  
  <p>Note that I will not use the method below.</p>
  
  <pre><code>// in angular-cli.json
  "apps": [
      {
          "root": "src",
          "index": "index.html",
          "styles": [
              "/dist/css/mobile.css",
              "/dist/css/desktop.css"
          ]
      }
  ]
  
  
  // in component.ts
  @Component({
      selector: 'app-root',
      templateUrl: './app.component.html',
      styleUrl: '/dist/css/mobile.css'
  })
  </code></pre>
  
  <p>I look forward to your advice.</p>
  
  <p>Thank you.</p>