5 lines
8.2 KiB
JSON
Raw Normal View History

{
"id": "api/animations/AnimationEvent",
"title": "AnimationEvent",
"contents": "\n\n<article>\n <div class=\"breadcrumb-container\">\n <div class=\"breadcrumb\">\n <script type=\"application/ld+json\">\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"BreadcrumbList\",\n \"itemListElement\": [\n { \"@type\": \"ListItem\", \"position\": 1, \"item\": { \"@id\": \"https://angular.io//api\", \"name\": \"API\" } },\n { \"@type\": \"ListItem\", \"position\": 2, \"item\": { \"@id\": \"https://angular.io/api/animations\", \"name\": \"@angular/animations\" } },\n { \"@type\": \"ListItem\", \"position\": 3, \"item\": { \"@id\": \"https://angular.io/api/animations/AnimationEvent\", \"name\": \"AnimationEvent\" } }\n ]\n }\n </script>\n <a href=\"/api\">API</a> > <a href=\"api/animations\">@angular/animations</a>\n </div>\n <div class=\"github-links\">\n <a href=\"https://github.com/angular/angular/edit/master/packages/animations/src/animation_event.ts?message=docs(animations)%3A%20describe%20your%20change...\" aria-label=\"Suggest Edits\" title=\"Suggest Edits\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">mode_edit</i></a>\n <a href=\"https://github.com/angular/angular/tree/12.0.0-next.7/packages/animations/src/animation_event.ts\" aria-label=\"View Source\" title=\"View Source\"><i class=\"material-icons\" aria-hidden=\"true\" role=\"img\">code</i></a>\n</div>\n </div>\n \n <header class=\"api-header\">\n <h1 id=\"animationevent\">AnimationEvent<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/animations/AnimationEvent#animationevent\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label interface\">interface</label>\n \n \n \n </header>\n \n <aio-toc class=\"embedded\"></aio-toc>\n\n <div class=\"api-body\">\n \n <section class=\"short-description\">\n <p>An instance of this class is returned as an event parameter when an animation\ncallback is captured for an animation either during the start or done phase.</p>\n\n <p><a href=\"api/animations/AnimationEvent#description\">See more...</a></p>\n </section>\n \n \n <section class=\"interface-overview\">\n<code-example language=\"ts\" hidecopy=\"true\">\ninterface <a href=\"api/animations/AnimationEvent\" class=\"code-anchor\">AnimationEvent</a> {\n <a class=\"code-anchor\" href=\"api/animations/AnimationEvent#fromState\"><span class=\"member-name\">fromState</span>: string</a>\n <a class=\"code-anchor\" href=\"api/animations/AnimationEvent#toState\"><span class=\"member-name\">toState</span>: string</a>\n <a class=\"code-anchor\" href=\"api/animations/AnimationEvent#totalTime\"><span class=\"member-name\">totalTime</span>: number</a>\n <a class=\"code-anchor\" href=\"api/animations/AnimationEvent#phaseName\"><span class=\"member-name\">phaseName</span>: string</a>\n <a class=\"code-anchor\" href=\"api/animations/AnimationEvent#element\"><span class=\"member-name\">element</span>: any</a>\n <a class=\"code-anchor\" href=\"api/animations/AnimationEvent#triggerName\"><span class=\"member-name\">triggerName</span>: string</a>\n <a class=\"code-anchor\" href=\"api/animations/AnimationEvent#disabled\"><span class=\"member-name\">disabled</span>: boolean</a>\n}\n</code-example>\n\n \n \n\n\n \n \n\n</section>\n\n \n\n \n \n<section class=\"description\">\n <h2 id=\"description\">Description<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/animations/AnimationEvent#description\"><i class=\"material-icons\">link</i></a></h2>\n <code-example language=\"typescript\">\n@<a href=\"api/core/Component\" class=\"code-anchor\">Component</a>({\n host: {\n '[@myAnimationTrigger]': 'someExpression',\n '(@myAnimationTrigger.start)': 'captureStartEvent($event)',\n '(@myAnimationTrigger.done)': 'captureDoneEvent($event)',\n },\n animations: [\n <a href=\"api/animations/trigger\" class=\"code-anchor\">trigger</a>(\"myAnimationTrigger\", [\n // ...\n ])\n
}