如何使 nativescript 方向限定符与 Angular2 一起使用?

How to make nativescript orientation qualifiers work with Angular2?

NativeScript支持很方便orientation qualifiers.

不幸的是,我无法使用 Angular 在 NativeScript 中完成这项工作。

我的 layout.land.html 或 layout.land.css 没有加载。 即使我将同时创建 layout.port.html 和 layout.land.html 并删除 land.html -> 应用程序抱怨找不到 layout.html。

我想 Angular 应用程序不支持它。如果是这种情况,是否有任何解决方法可以根据方向或其他限定符加载不同的布局?

我知道 this plugin 但我更喜欢上面的解决方案,因为它是内置的并且允许完全不同的布局。

Angular-2 应用程序当前不支持屏幕限定符。 此外,如 所述,此时您无法更改 Angular-2 中的 templateUrls。

您可以跟踪 this issue NativeScript + Angular-2 的屏幕限定词使用情况被记录为所需功能。