By Zach Tindall
| // Angular Testing Library + Spectacular 0.5 | |
| const { | |
| fixture: { | |
| debugElement: { injector }, | |
| }, | |
| } = await render(SpectacularAppComponent, { | |
| excludeComponentDeclaration: true, | |
| imports: [ | |
| SpectacularFeatureTestingModule.withFeature({ | |
| featureModule: HeroesModule, |
| /// Scales a color to be darker if it's light, or lighter if it's dark. Use this function to tint a color appropriate to its lightness. | |
| /// | |
| /// @param {Color} $color - Color to scale. | |
| /// @param {Percentage} $scale [5%] - Amount to scale up or down. | |
| /// @param {Percentage} $threshold [40%] - Threshold of lightness to check against. | |
| /// | |
| /// @returns {Color} A scaled color. | |
| @function smart-scale($color, $scale: 5%, $threshold: 40%) { | |
| @if lightness($color) > $threshold { | |
| $scale: -$scale; |
| // Copyright © 2011-2020 ZURB, Inc. | |
| // MIT License | |
| // Permission is hereby granted, free of charge, to any person obtaining | |
| // a copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to | |
| // permit persons to whom the Software is furnished to do so, subject to |
| import { | |
| // ArgsTable, | |
| Description, | |
| Primary, | |
| // PRIMARY_STORY, | |
| Stories, | |
| Subtitle, | |
| Title, | |
| } from '@storybook/addon-docs'; | |
| import { createElement } from 'react'; |
import { Canvas, Meta, Source, Story } from '@storybook/addon-docs'; import * as stories from './card.stories';
A card is an element which you can put any kind of content inside. Make sure
you wrap your content in a <fas-card-section>
element in order to achieve the traditional card look.
| <h3>Top Heroes</h3> | |
| <div class="grid grid-pad"> | |
| <a | |
| *ngFor="let hero of heroes" | |
| class="col-1-4" | |
| routerLink="/detail/{{ hero.id }}" | |
| > | |
| <div class="module hero"> | |
| <h4>{{ hero.name }}</h4> | |
| </div> |
Resets the URL to what it was before the navigation that caused an error. No new navigation is triggered.
'deferred'(the default) updates the browser URL after successful navigation.
graph TD
A[Should I use an Angular module?] --> B{Is it a component?}
B -->|Yes| X[Don't use an Angular module]
B -->|No| C{Is it a directive?}
C -->|Yes| X
C -->|No| D{Is it a pipe?}
D -->|Yes| X
D -->|No| E{Is it a service?}
E -->|Yes| XCopyright 2024 Lars Gyrup Brink Nielsen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT