FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nativescript-angular/tests/app/base.component.ts at master · NativeScript/nativescript-angular · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
NativeScript
/
nativescript-angular
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
240
Star
1.2k
Code
Issues
294
Pull requests
2
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
nativescript-angular
/
tests
/
app
/
base.component.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
22 lines (17 loc) · 563 Bytes
Breadcrumbs
nativescript-angular
/
tests
/
app
/
base.component.ts
Copy path
File metadata and controls
22 lines (17 loc) · 563 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import
{
InjectionToken
,
OnInit
,
OnDestroy
}
from
"@angular/core"
;
export
const
HOOKS_LOG
=
new
InjectionToken
(
"Hooks log"
)
;
import
{
BehaviorSubject
}
from
"rxjs"
;
export
class
BaseComponent
implements
OnInit
,
OnDestroy
{
protected
name
:
string
=
""
;
constructor
(
protected
hooksLog
:
BehaviorSubject
<
Array
<
string
>
>
)
{
}
ngOnInit
(
)
{
this
.
log
(
"init"
)
;
}
ngOnDestroy
(
)
{
this
.
log
(
"destroy"
)
;
}
private
log
(
method
:
string
)
{
this
.
hooksLog
.
next
(
[
...
this
.
hooksLog
.
value
,
this
.
name
+
"."
+
method
]
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL