declare module '*.json' {
const value: any;
export default value;
}
This file contains hidden or 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
| <!-- wInViewRoot directive is needed to specify the `root` for `IntersectionObserver` and some other it's options e.g. `margin` --> | |
| <div class="container" wInViewRoot="viewport"> | |
| Any content can be here | |
| <w-in-view-item> | |
| <!-- Content will be replaced by a placeholder <div> with the same height as original content. | |
| Also `InViewItemComponent`s change detector will be detached when it become invisible which means | |
| all the content's change detectors won't be reachable and will be inactive as well. --> | |
| </w-in-view-item> | |
| ...or any other content can be here | |
| <w-in-view-item> |
Angular has CanDeactivate guard, but you have to declare it to each path in the routes configuration.
Valid until angular/angular#11836 will be done.
You can use CanActivateChild guard to prevent leaving from any component with single declaration.