File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
apps/demo/src/app/components Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ npm install ngx-breakpoint-observer
15
15
``` ts
16
16
import {
17
17
breakpointsTailwind ,
18
- observeBreakpoints ,
18
+ injectBreakpoints ,
19
19
} from ' ngx-breakpoint-observer' ;
20
20
21
21
@Component ({})
22
22
export class AppComponent {
23
- breakpoints = observeBreakpoints (breakpointsTailwind );
23
+ breakpoints = injectBreakpoints (breakpointsTailwind );
24
24
25
25
reactiveStuff = signal <keyof typeof breakpointsTailwind >(' sm' );
26
26
isGreaterThanSignal = this .breakpoints .greaterOrEqual (this .reactiveStuff ); // use signal without calling it!
@@ -33,11 +33,11 @@ export class AppComponent {
33
33
```
34
34
35
35
``` ts
36
- import { observeBreakpoints } from ' ngx-breakpoint-observer' ;
36
+ import { injectBreakpoints } from ' ngx-breakpoint-observer' ;
37
37
38
38
@Component ({})
39
39
export class AppComponent {
40
- breakpoints = observeBreakpoints ({
40
+ breakpoints = injectBreakpoints ({
41
41
mobile: 0 , // optional
42
42
tablet: 640 ,
43
43
laptop: 1024 ,
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ import { CodeBlock } from './code-block';
14
14
export class Usage {
15
15
usage1 = `import {
16
16
breakpointsTailwind,
17
- observeBreakpoints ,
17
+ injectBreakpoints ,
18
18
} from 'ngx-breakpoint-observer';
19
19
20
20
@Component({})
21
21
export class AppComponent {
22
- breakpoints = observeBreakpoints (breakpointsTailwind);
22
+ breakpoints = injectBreakpoints (breakpointsTailwind);
23
23
24
24
reactiveStuff = signal<keyof typeof breakpointsTailwind>('sm');
25
25
isGreaterThanSignal = this.breakpoints.greaterOrEqual(this.reactiveStuff); // use signal without calling it!
@@ -30,11 +30,11 @@ export class AppComponent {
30
30
smallerThanLg = this.breakpoints.smaller('lg'); // only smaller than lg
31
31
}` ;
32
32
33
- usage2 = `import { observeBreakpoints } from 'ngx-breakpoint-observer';
33
+ usage2 = `import { injectBreakpoints } from 'ngx-breakpoint-observer';
34
34
35
35
@Component({})
36
36
export class AppComponent {
37
- breakpoints = observeBreakpoints ({
37
+ breakpoints = injectBreakpoints ({
38
38
mobile: 0, // optional
39
39
tablet: 640,
40
40
laptop: 1024,
You can’t perform that action at this time.
0 commit comments