【发布时间】:2016-08-08 04:58:45
【问题描述】:
我想为我的网站的网络版本和移动版本重复使用组件。网站差异很大,因此响应式设计不可行。
理想情况下,有一种方法可以根据屏幕分辨率提供多个 templateUrls,但我认为不存在这样的东西。
例子:
@Component({
selector: 'multiplatform-component',
templateUrl-sm: 'app/sm.html',
templateUrl-md: 'app/md.html',
})
解决此问题的最佳方法是什么?
【问题讨论】:
-
未来会有平台支持这个功能,see issue here。因此,在充分尊重给出的答案的情况下,我鼓励您不要现在花太多时间来实施它。
标签: web responsive-design angular mobile-website