UNPKG

1.51 kBTypeScriptView Raw
1import { NgZone } from '@angular/core';
2import { Platform } from '../../platform/platform';
3import { DisplayWhen } from './display-when';
4/**
5 * @name HideWhen
6 * @description
7 * The `hideWhen` attribute takes a string that represents a plaform or screen orientation.
8 * The element the attribute is added to will only be hidden when that platform or screen orientation is active.
9 *
10 * Complements the [showWhen attribute](../ShowWhen). If the `hideWhen` attribute is used on an
11 * element that also has the `showWhen` attribute, the element will not show if `hideWhen` evaluates
12 * to `true` or `showWhen` evaluates to `false`. If the `hidden` attribute is also added, the element
13 * will not show if `hidden` evaluates to `true`.
14 *
15 * View the [Platform API docs](../../../platform/Platform) for more information on the different
16 * platforms you can use.
17 *
18 * @usage
19 * ```html
20 * <div hideWhen="android">
21 * I am hidden on Android!
22 * </div>
23 *
24 * <div hideWhen="ios">
25 * I am hidden on iOS!
26 * </div>
27 *
28 * <div hideWhen="android,ios">
29 * I am hidden on Android and iOS!
30 * </div>
31 *
32 * <div hideWhen="portrait">
33 * I am hidden on Portrait!
34 * </div>
35 *
36 * <div hideWhen="landscape">
37 * I am hidden on Landscape!
38 * </div>
39 * ```
40 *
41 * @demo /docs/demos/src/hide-when/
42 * @see {@link ../ShowWhen ShowWhen API Docs}
43 * @see {@link ../../../platform/Platform Platform API Docs}
44*/
45export declare class HideWhen extends DisplayWhen {
46 constructor(hideWhen: string, plt: Platform, zone: NgZone);
47}