5 lines
37 KiB
JSON
Raw Permalink Normal View History

{
"id": "api/animations/transition",
"title": "transition",
"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/transition\", \"name\": \"transition\" } }\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_metadata.ts?message=docs(animations)%3A%20describe%20your%20change...#L872-L1047\" 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_metadata.ts#L872-L1047\" 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=\"transition\">transition<a title=\"Link to this heading\" class=\"header-link\" aria-hidden=\"true\" href=\"api/animations/transition#transition\"><i class=\"material-icons\">link</i></a></h1>\n \n <label class=\"api-type-label function\">function</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>Declares an animation transition as a sequence of animation steps to run when a given\ncondition is satisfied. The condition is a Boolean expression or function that compares\nthe previous and current animation states, and returns true if this transition should occur.\nWhen the state criteria of a defined transition are met, the associated animation is\ntriggered.</p>\n\n \n </section>\n \n \n \n\n <div class=\"overload-info\">\n \n\n <code-example language=\"ts\" hidecopy=\"true\" class=\"no-box api-heading\"> <span class=\"member-name\"><a href=\"api/animations/transition\" class=\"code-anchor\">transition</a></span>(stateChangeExpr: string | ((fromState: string, toState: string, element?: any, params?: { [key: string]: any; }) => boolean), steps: <a href=\"api/animations/AnimationMetadata\" class=\"code-anchor\">AnimationMetadata</a> | <a href=\"api/animations/AnimationMetadata\" class=\"code-anchor\">AnimationMetadata</a>[], options: <a href=\"api/animations/AnimationOptions\" class=\"code-anchor\">AnimationOptions</a> = null): <a href=\"api/animations/AnimationTransitionMetadata\" class=\"code-anchor\">AnimationTransitionMetadata</a></code-example>\n\n \n\n <h6 class=\"no-anchor\" id=\"parameters\">Parameters</h6>\n <table class=\"is-full-width list-table parameters-table function-overload-parameters\">\n <tbody>\n \n <tr class=\"function-overload-parameter\">\n <td class=\"param-name\">\n <a id=\"\"></a>\n <code>stateChangeExpr</code>\n </td>\n <td class=\"param-type\"><code>string | ((fromState: string, toState: string, element?: any, params?: { [key: string]: any; }) => boolean)</code></td>\n <td class=\"param-description\">\n <p>A Boolean expression or function that compares the previous and current\nanimation states, and returns true if this transition should occur. Note that \"true\" and \"false\"\nmatch 1 and 0, respectively. An expression is evaluated each time a state change occurs in the\nanimation trigger element.\nThe animation steps run when the expression evaluates to true.</p>\n<ul>\n<li>\n<p>A state-change string takes the form \"
}