Skip to content

Instantly share code, notes, and snippets.

View Setubal18's full-sized avatar
๐Ÿ 
Working from home

Leonardo Setubal Maggio Setubal18

๐Ÿ 
Working from home
View GitHub Profile
import {Directive, ElementRef, Input, OnInit} from '@angular/core';
import { FormControl } from '@angular/forms';
type ErrorTypes = {
[key: string]: () => void;
};
@Directive({
selector: '[FormErrorsMessage]'
})
@Setubal18
Setubal18 / SubscriptionManager.ts
Created February 11, 2021 12:21 — forked from julianpoemp/SubscriptionManager.ts
Easy and secure way to manage subscriptions in Angular 8, Angular 7, Angular 6 (and less)
/*
Version 1.1.0
For new versions of this class go to https://gist.github.com/julianpoemp/0c4dc13541b863f6503026333eb6b2b6
License: MIT
*/
import {Subscription} from 'rxjs';
export class SubscriptionManager {
private subscriptions: {
id: number,
@Setubal18
Setubal18 / .angular-htaccess.md
Created July 16, 2020 13:34 — forked from julianpoemp/.angular-htaccess.md
Optimal .htaccess configuration for Angular 9, Angular 8, Angular 7, Angular 6, Angular 5 (and older) app in production incl. fix for the angular browser caching issue.

New generator

I created a new htaccess generator for angular apps that makes it easier for you to create the optimal htaccess file: https://julianpoemp.github.io/ngx-htaccess-generator/

The goal of this generator is to make the configuration process much easier. To make this possible I created a kind of interview mode with some questions. As an additional feature the generator supports adding exclusions for example if you have installed a blog in a subdirectory of your web application.

The generator ๐Ÿ˜: https://julianpoemp.github.io/ngx-htaccess-generator/ The project: https://github.com/julianpoemp/ngx-htaccess-generator Place for issues and bug reports: https://github.com/julianpoemp/ngx-htaccess-generator/issues