Skip to content

Commit c0ec1d6

Browse files
bradlygreenbenlesh
authored andcommitted
docs: update product-alerts.component.1.ts (angular#29917)
Make the example match the generated output seen in StackBlitz as shown https://next.angular.io/getting-started#input step 2 "Open product-alerts.component.ts." PR Close angular#29917
1 parent 4bde40f commit c0ec1d6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// #docplaster
22
// #docregion as-generated, imports
3-
import { Component } from '@angular/core';
3+
import { Component, OnInit } from '@angular/core';
44
// #enddocregion as-generated
55
import { Input } from '@angular/core';
66
// #enddocregion imports
@@ -12,8 +12,13 @@ import { Input } from '@angular/core';
1212
styleUrls: ['./product-alerts.component.css']
1313
})
1414
// #docregion input-decorator
15-
export class ProductAlertsComponent {
15+
export class ProductAlertsComponent implements OnInit {
1616
// #enddocregion as-generated
1717
@Input() product;
1818
// #docregion as-generated
19+
constructor() { }
20+
21+
ngOnInit() {
22+
}
23+
1924
}

0 commit comments

Comments
 (0)