projects
/
examples
/
angular-tour-of-heroes
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
439212de66abd8b500099a5a371cfd1185ef8b96
[examples/angular-tour-of-heroes]
/
src
/
app
/
message.service.ts
1
import { Injectable } from '@angular/core';
2
3
@Injectable({
4
providedIn: 'root'
5
})
6
export class MessageService {
7
8
messages : string[] = [];
9
10
add(message : string): void {
11
this.messages.push(message);
12
}
13
14
clear(): void {
15
this.messages = [];
16
}
17
}