Skip to content

Commit 278d1ff

Browse files
DI explanation
1 parent 4b43193 commit 278d1ff

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

APM-Final/src/app/hello/helloWord.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { StudyEnglishComponent} from "../study/study.english.component";
77
selector:'hello-word',
88
template:'<div class="hello" style="font:200px">hello world</div>',
99
styleUrls:['./helloWord.component.css'],
10-
providers:[StudyEnglishComponent]
1110
})
1211
export class HelloComponent{
1312

APM-Final/src/app/study/study.english.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {Component,Injectable} from "@angular/core";
22

33

44
@Component({"template":"<div>I love studying</div>"})
5-
@Injectable()
5+
@Injectable({providedIn:"root"})
66
export class StudyEnglishComponent{
77

88

0 commit comments

Comments
 (0)