import { IConfigMap, IMarker, tileLayers } from '@mugan86/ng-leaflet'; | |
import { Component } from '@angular/core'; | |
@Component({ | |
selector: 'app-map', | |
templateUrl: './map.component.html', | |
styleUrls: ['./map.component.css'] | |
}) | |
export class MapComponent{ | |
markers: Array<IMarker> = [ | |
{ |
import { TranslateLoader } from '@ngx-translate/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import { forkJoin, of } from 'rxjs'; | |
import { catchError, map } from 'rxjs/operators'; | |
import merge from 'deepmerge'; // need install dependencies with npm i deepmerge | |
export class CustomTranslateLoader implements TranslateLoader { | |
constructor(private http: HttpClient, private prefix: string = 'app') {} | |
public getTranslation(lang: string): any { | |
return this.http.get( |
{ | |
"root": true, | |
"ignorePatterns": ["projects/**/*"], | |
"overrides": [ | |
{ | |
"files": ["*.ts"], | |
"parserOptions": { | |
"project": ["tsconfig.json"], | |
"createDefaultProgram": true | |
}, |
(Pendiente añadir un ejemplo real con una app Angular e imágenes de capturas dentro del editor) El objetivo principal de este artículo es proporcionar los pasos a seguir con las instrucciones detalladas y necesarias para poder configurar un proyecto de Angular con las herramientas que nos va a ayudar a trabajar con buenas prácticas.
Estas buenas prácticas que queremos aplicar se realizarán tanto en la escritura del código, siguiendo una línea estable de escritura con unas normas preestablecidas y también en lo que respecta a la adición de mensajes de commit donde realizaremos las configuraciones necesarias con el objetivo de respetar la convención para escribir los mensajes de commit siguiendo una estructura común que se usará en infinidad de proyectos, con lo que esto proporcionará una forma de trabajar estable y correcta mediante git flow escribiendo mensajes de commit.
{ | |
"controls": [ | |
{ | |
"name": "firstName", | |
"label": "First name:", | |
"value": "", | |
"type": "text", | |
"validators": { | |
"required": true, | |
"minLength": 10 |
import { ControlPosition } from "leaflet"; | |
... | |
export interface IBackToHomeOptions { | |
position?: ControlPosition; | |
home?: {lat: number, lng: number}; | |
text?: string; | |
} |
import axios from "axios"; | |
import { geoJSON, Map, circleMarker, circle } from "leaflet"; | |
import { tileLayers, tileLayerSelect } from "../../config/tile-layer"; | |
// Para personalizar las zonas con diferentes colores | |
function getColor(numberValue: number) { | |
return numberValue >= 0 && numberValue < 1 | |
? "white" | |
: numberValue >= 1 && numberValue < 2 | |
? "green" |
const myPersonalData = { | |
name: 'Anartz', | |
lastname: 'Mugika Ledo', | |
birthday: '10-01-1986', | |
hobbies: [ | |
'hobbies: sports, photography, studying health and technology topics', | |
], | |
blog: 'https://mugan86.medium.com/', | |
portfolio: 'https://anartz-mugika.com/', | |
}; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Fast URL Shortener</title> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="styles.css" /> | |
</head> | |
<body> | |
<div class="box"> | |
<h2>Fast URL Shortener</h2> |