Skip to content

Commit fa730ff

Browse files
committed
docs(datetime): fix angular demos where ViewEncapsulation needs to be off
1 parent f419383 commit fa730ff

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

static/usage/v7/datetime/styling/calendar-days/angular/example_component_ts.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
```ts
2-
import { Component, OnInit, ViewChild } from '@angular/core';
2+
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
33

4+
// ViewEncapsulation is turned off for this demo due to
5+
// a lack of support for styling multiple css shadow parts
6+
// See https://github.com/angular/angular/issues/22515
47
@Component({
58
selector: 'app-example',
69
templateUrl: 'example.component.html',
710
styleUrls: ['example.component.css'],
11+
encapsulation: ViewEncapsulation.None
812
})
913
export class ExampleComponent implements OnInit {
1014
public datetime;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
```ts
2+
import { Component, ViewEncapsulation } from '@angular/core';
3+
4+
// ViewEncapsulation is turned off for this demo due to
5+
// a lack of support for styling multiple css shadow parts
6+
// See https://github.com/angular/angular/issues/22515
7+
@Component({
8+
selector: 'app-example',
9+
templateUrl: 'example.component.html',
10+
styleUrls: ['example.component.css'],
11+
encapsulation: ViewEncapsulation.None
12+
})
13+
export class ExampleComponent { }
14+
```

static/usage/v7/datetime/styling/wheel-styling/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import vue from './vue.md';
99

1010
import angular_example_component_html from './angular/example_component_html.md';
1111
import angular_example_component_css from './angular/example_component_css.md';
12+
import angular_example_component_ts from './angular/example_component_ts.md';
1213

1314
<Playground
1415
version="7"
@@ -25,6 +26,7 @@ import angular_example_component_css from './angular/example_component_css.md';
2526
files: {
2627
'src/app/example.component.html': angular_example_component_html,
2728
'src/app/example.component.css': angular_example_component_css,
29+
'src/app/example.component.ts': angular_example_component_ts,
2830
},
2931
},
3032
}}

0 commit comments

Comments
 (0)