1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import { ElementRef } from '@angular/core';
|
9 | import { MediaMarshaller, BaseDirective2, StyleBuilder, StyleDefinition, StyleUtils } from '@angular/flex-layout/core';
|
10 | export declare class ImgSrcStyleBuilder extends StyleBuilder {
|
11 | buildStyles(url: string): {
|
12 | content: string;
|
13 | };
|
14 | }
|
15 | export declare class ImgSrcDirective extends BaseDirective2 {
|
16 | protected platformId: Object;
|
17 | protected serverModuleLoaded: boolean;
|
18 | protected DIRECTIVE_KEY: string;
|
19 | protected defaultSrc: string;
|
20 | set src(val: string);
|
21 | constructor(elementRef: ElementRef, styleBuilder: ImgSrcStyleBuilder, styler: StyleUtils, marshal: MediaMarshaller, platformId: Object, serverModuleLoaded: boolean);
|
22 | /**
|
23 | * Use the [responsively] activated input value to update
|
24 | * the host img src attribute or assign a default `img.src=''`
|
25 | * if the src has not been defined.
|
26 | *
|
27 | * Do nothing to standard `<img src="">` usages, only when responsive
|
28 | * keys are present do we actually call `setAttribute()`
|
29 | */
|
30 | protected updateWithValue(value?: string): void;
|
31 | protected styleCache: Map<string, StyleDefinition>;
|
32 | }
|
33 | /**
|
34 | * This directive provides a responsive API for the HTML <img> 'src' attribute
|
35 | * and will update the img.src property upon each responsive activation.
|
36 | *
|
37 | * e.g.
|
38 | * <img src="defaultScene.jpg" src.xs="mobileScene.jpg"></img>
|
39 | *
|
40 | * @see https://css-tricks.com/responsive-images-youre-just-changing-resolutions-use-src/
|
41 | */
|
42 | export declare class DefaultImgSrcDirective extends ImgSrcDirective {
|
43 | protected inputs: string[];
|
44 | }
|