What are the basic rules of decorators?



What are the basic rules of decorators?..

Answer / Daleep Singh

Decorators in Angular can be applied to classes, methods, properties, and parameters. They provide a way to add behavior or metadata to existing code without modifying it directly. The basic rules include: they must return a function, they can rearrange the code through function calls, and they can access the original function, class, etc. via arguments.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Is angular front end or backend?

1 Answers  


What is the difference between Rootscope and Scope in AngularJS?

1 Answers  


What is ng-include and when to use it?

1 Answers  


How long has angularjs been around?

1 Answers  


What is the difference between $scope and scope in angularjs?

1 Answers  


What is the difference between $evalasync and $timeout in angularjs?

1 Answers  


What is router and its types?

1 Answers  


How will you explain the concept of hierarchy? How many scopes can an application have?

1 Answers  


What is guard in angular?

1 Answers  


Is $http service is restful web service in angular js?

1 Answers  


What is scope in AngularJS?

1 Answers   Xoriant,


What do you mean by module in angular 2?

1 Answers  


Categories