What are “decorators” and how are they used?
问题 I\'m curious what exactly decorators are in AngularJS. There isn\'t much information online for decorators save for a blurb in the AngularJS documentation and a brief (albeit interesting) mention in a youtube video. As the Angular guys put it a decorator is: Decoration of service, allows the decorator to intercept the service instance creation. The returned instance may be the original instance, or a new instance which delegates to the original instance. I don\'t really know what that means ,