Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(animations): Add a provider to lazy load the animations
In order to support Lazy loading of Animations `@angular/animations/browser` must be lazy loaded. Due to the dependencies of the exising providers a new entry point in `platform-browser` had to be created. Usage: use `provideLazyLoadedAnimation()` in the list of providers in ``bootstrapApplication`.
- Loading branch information
Showing
65 changed files
with
4,966 additions
and
808 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
goldens/public-api/platform-browser/lazy-animations/errors.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## API Report File for "angular-srcs" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
// @public | ||
export const enum RuntimeErrorCode { | ||
// (undocumented) | ||
MODULE_LOADING_FAILED = 5950 | ||
} | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
14 changes: 14 additions & 0 deletions
14
goldens/public-api/platform-browser/lazy-animations/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## API Report File for "@angular/platform-browser_lazy-animations" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
import { Provider } from '@angular/core'; | ||
|
||
// @public | ||
export function provideLazyLoadedAnimations(type?: 'animations' | 'noop'): Provider[]; | ||
|
||
// (No @packageDocumentation comment for this package) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ ng_module( | |
), | ||
deps = [ | ||
"//packages/animations", | ||
"//packages/common", | ||
"//packages/core", | ||
], | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import {ApplicationRef} from '@angular/core'; | ||
|
||
import {NoopAnimationStyleNormalizer, WebAnimationsStyleNormalizer} from './dsl/animation_style_normalizer'; | ||
import {NoopAnimationDriver, WebAnimationsDriver} from './render/animation_driver'; | ||
import {AnimationEngine} from './render/animation_engine_next'; | ||
|
||
export function createEngine( | ||
type: 'animations'|'noop', applicationRef: ApplicationRef, doc: Document): AnimationEngine { | ||
if (type === 'noop') { | ||
return new AnimationEngine( | ||
doc, new NoopAnimationDriver(), new NoopAnimationStyleNormalizer(), applicationRef); | ||
} | ||
|
||
return new AnimationEngine( | ||
doc, new WebAnimationsDriver(), new WebAnimationsStyleNormalizer(), applicationRef); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 0 additions & 32 deletions
32
packages/animations/browser/src/dsl/style_normalization/animation_style_normalizer.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.