Angular2 Web vs Mobile TemplateURL

I’d like to reuse components for a web version of my website as well as a mobile version. The websites are vastly different so responsive design is not feasible.

Ideally, there would be a way to provide multiple templateUrls based on the screen resolution, but I don’t think something like this exists.


  selector: 'multiplatform-component',
  templateUrl-sm: 'app/sm.html',
  templateUrl-md: 'app/md.html',

What is the best way to approach this?

Leave a Reply

Notify of