title: How to dynamically compose a route in angular?
body: <p>Let's suppose I have a service that fetches an array of paths formatted in json like this:</p>
  
  <pre><code>[{
      "path": "routeName"
      "component": "MyComponent"
  }]
  </code></pre>
  
  <p>Of coures "MyComponent" is retrieved as a string. Now I want translate this array into Routes for a routing-module. How can I convert "MyComponent" into the class MyComponent?</p>
  
  <p>The purpose of this is to make my frontend unaware of what it is. To add new routes and components I just need to add a new entry to the file on the server and make it match the component name I create inside the angular app.</p>