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
import { | |
AbstractControl, | |
FormArray, | |
FormGroup, | |
ValidationErrors, | |
} from '@angular/forms'; | |
async function sleep() { | |
return new Promise((resolve) => { | |
setTimeout(() => { |
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
<h1 class="text-2xl font-bold">{{ product().title }}</h1> | |
<div class="divider"></div> | |
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4"> | |
<!-- Datos generales --> | |
<div class="flex flex-col gap-2"> | |
<h2 class="text-2xl font-bold h-12">Datos generales</h2> | |
<input | |
type="text" | |
placeholder="Título" |
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
const color = '#xxxxxx'.replace(/x/g, (y) => | |
((Math.random() * 16) | 0).toString(16) | |
); |
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
static namePattern = '([a-zA-Z]+) ([a-zA-Z]+)'; | |
static emailPattern = '^[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,4}$'; | |
static notOnlySpacesPattern = '^[a-zA-Z0-9]+$'; |
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
export enum Color { | |
red, | |
black, | |
blue, | |
green, | |
} | |
export enum Creator { | |
DC, | |
Marvel, |
Característica | Map |
Set |
---|---|---|
Almacena | Pares clave-valor | Valores únicos |
Claves permitidas | Cualquier tipo de dato | No aplica |
Valores duplicados | Permitidos (por clave única) | No permitidos |
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
const imageUrls: string[] = [ | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-4.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-5.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-6.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-7.jpg", | |
"https://flowbite.s3.amazonaws.com/docs/gallery/square/image-8.jpg", |
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
<h1>{{ name() }}</h1> | |
<dl> | |
<td>Nombre:</td> | |
<dd>{{ name() }}</dd> | |
<td>Edad:</td> | |
<dd>{{ age() }}</dd> | |
<td>Método:</td> |
NewerOlder