Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is the code for creating a decorator?
Home
Angular
What is the code for creating a decorator?
0
votes
asked
Jan 6, 2020
in
Angular
by
sharadyadav1986
What is the code for creating a decorator?
#decorator-code
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jan 6, 2020
by
rajeshsharma
We create a decorator called Dummy:
function Dummy(target) {
dummy.log('This decorator is Dummy', target);
}
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: What is the correct syntax for using a decorator?
asked
Dec 15, 2023
in
Angular
by
AdilsonLima
angularjs-interview-questions-answers
0
votes
Q: What is the correct syntax for using a decorator?
asked
Dec 12, 2023
in
Angular
by
DavidAnderson
angularjs-interview-questions-answers
0
votes
Q: What does the input decorator handle use for its default name mapping?
asked
Dec 8, 2023
in
Angular
by
GeorgeBell
angularjs-interview-questions-answers
0
votes
Q: What does the host listener decorator take in the name of the event for the first argument as?
asked
Dec 8, 2023
in
Angular
by
GeorgeBell
angularjs-interview-questions-answers
+1
vote
Q: What is the decorator used for configuring your module class?
asked
Jul 5, 2021
in
Angular
by
sharadyadav1986
configure-module-class
0
votes
Q: Which optional metadata property does the pipe decorator use to define whether a pipe is stateless or stateful?
asked
Dec 7, 2023
in
Angular
by
GeorgeBell
angularjs-interview-questions-answers
+1
vote
Q: What is the difference between an Annotation and a Decorator in Angular?
asked
Jan 15, 2020
in
Angular
by
rahuljain1
#angular-
0
votes
Q: Explain the difference between an Annotation and a Decorator in Angular?
asked
Jan 6, 2020
in
Angular
by
sharadyadav1986
#angular-annotation-vs-decorator
0
votes
Q: Which option shows the correct importation of the NGModule decorator?
asked
Dec 13, 2023
in
Angular
by
DavidAnderson
angularjs-interview-questions-answers
0
votes
Q: How can you import more than one type of decorator?
asked
Dec 13, 2023
in
Angular
by
DavidAnderson
angularjs-interview-questions-answers
...