Skip to content

Commit d84703a

Browse files
crisbetoandrewseguin
authored andcommitted
build: switch dev app to standalone components
Switches the dev app components to the new standalone components API which saves us a bunch of boilerplate.
1 parent 067a094 commit d84703a

File tree

240 files changed

+1192
-2702
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+1192
-2702
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"@angular-devkit/build-angular": "14.0.0-next.12",
7272
"@angular-devkit/core": "14.0.0-next.12",
7373
"@angular-devkit/schematics": "14.0.0-next.12",
74-
"@angular/bazel": "14.0.0-next.15",
74+
"@angular/bazel": "14.0.0-next.14",
7575
"@angular/cli": "14.0.0-next.12",
7676
"@angular/compiler-cli": "14.0.0-next.15",
7777
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#335aad1b04b3d95cd4cb1d719e73b93d4e90cce3",

src/dev-app/autocomplete/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ ng_module(
1616
"//src/material/form-field",
1717
"//src/material/input",
1818
"@npm//@angular/forms",
19-
"@npm//@angular/router",
2019
],
2120
)
2221

src/dev-app/autocomplete/autocomplete-demo-module.ts

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/dev-app/autocomplete/autocomplete-demo.ts

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
*/
88

99
import {Component, ViewChild} from '@angular/core';
10-
import {FormControl, NgModel} from '@angular/forms';
10+
import {CommonModule} from '@angular/common';
11+
import {FormControl, FormsModule, NgModel, ReactiveFormsModule} from '@angular/forms';
12+
import {MatAutocompleteModule} from '@angular/material/autocomplete';
13+
import {MatButtonModule} from '@angular/material/button';
14+
import {MatCardModule} from '@angular/material/card';
15+
import {MatFormFieldModule} from '@angular/material/form-field';
16+
import {MatInputModule} from '@angular/material/input';
1117
import {Observable} from 'rxjs';
1218
import {map, startWith} from 'rxjs/operators';
1319

@@ -25,6 +31,17 @@ export interface StateGroup {
2531
selector: 'autocomplete-demo',
2632
templateUrl: 'autocomplete-demo.html',
2733
styleUrls: ['autocomplete-demo.css'],
34+
standalone: true,
35+
imports: [
36+
CommonModule,
37+
FormsModule,
38+
MatAutocompleteModule,
39+
MatButtonModule,
40+
MatCardModule,
41+
MatFormFieldModule,
42+
MatInputModule,
43+
ReactiveFormsModule,
44+
],
2845
})
2946
export class AutocompleteDemo {
3047
stateCtrl = new FormControl({code: 'CA', name: 'California'});

src/dev-app/badge/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ng_module(
1414
"//src/material/button",
1515
"//src/material/icon",
1616
"@npm//@angular/forms",
17-
"@npm//@angular/router",
1817
],
1918
)
2019

src/dev-app/badge/badge-demo-module.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/dev-app/badge/badge-demo.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,18 @@
77
*/
88

99
import {Component} from '@angular/core';
10+
import {CommonModule} from '@angular/common';
11+
import {FormsModule} from '@angular/forms';
12+
import {MatBadgeModule} from '@angular/material/badge';
13+
import {MatButtonModule} from '@angular/material/button';
14+
import {MatIconModule} from '@angular/material/icon';
1015

1116
@Component({
1217
selector: 'badge-demo',
1318
templateUrl: 'badge-demo.html',
1419
styleUrls: ['badge-demo.css'],
20+
standalone: true,
21+
imports: [CommonModule, FormsModule, MatBadgeModule, MatButtonModule, MatIconModule],
1522
})
1623
export class BadgeDemo {
1724
visible = true;

src/dev-app/baseline/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ng_module(
1717
"//src/material/radio",
1818
"//src/material/select",
1919
"//src/material/toolbar",
20-
"@npm//@angular/router",
2120
],
2221
)
2322

src/dev-app/baseline/baseline-demo-module.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/dev-app/baseline/baseline-demo.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,30 @@
77
*/
88

99
import {Component} from '@angular/core';
10+
import {CommonModule} from '@angular/common';
11+
import {MatCardModule} from '@angular/material/card';
12+
import {MatCheckboxModule} from '@angular/material/checkbox';
13+
import {MatFormFieldModule} from '@angular/material/form-field';
14+
import {MatInputModule} from '@angular/material/input';
15+
import {MatRadioModule} from '@angular/material/radio';
16+
import {MatSelectModule} from '@angular/material/select';
17+
import {MatToolbarModule} from '@angular/material/toolbar';
1018

1119
@Component({
1220
selector: 'baseline-demo',
1321
templateUrl: 'baseline-demo.html',
1422
styleUrls: ['baseline-demo.css'],
23+
standalone: true,
24+
imports: [
25+
CommonModule,
26+
MatCardModule,
27+
MatCheckboxModule,
28+
MatFormFieldModule,
29+
MatInputModule,
30+
MatRadioModule,
31+
MatSelectModule,
32+
MatToolbarModule,
33+
],
1534
})
1635
export class BaselineDemo {
1736
name: string;

0 commit comments

Comments
 (0)