Skip to content

Commit 57ad004

Browse files
committed
feat: simplify Control component template and update encapsulation settings
1 parent 5672a80 commit 57ad004

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
<p class="control">
2-
<label for="request">{{label()}}</label>
3-
<ng-content select="input, textarea"></ng-content>
4-
</p>
1+
<label for="request">{{label()}}</label>
2+
<ng-content select="input, textarea"></ng-content>

06-cmp-deep-dive/01-starting-project/src/app/dashboard/shared/control/control.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ import { Component, input, ViewEncapsulation } from '@angular/core';
66
imports: [],
77
templateUrl: './control.component.html',
88
styleUrl: './control.component.css',
9-
encapsulation: ViewEncapsulation.Emulated
9+
encapsulation: ViewEncapsulation.None,
10+
host: {
11+
class: 'control'
12+
}
1013
})
1114
export class ControlComponent {
1215
label = input.required<string>();

0 commit comments

Comments
 (0)