Procuramos dois devs full-stack acima da média para fazer parte do nosso novo time.
Escritório, Rio de Janeiro - Botafogo (Possibilidade home-office)
| declare module '@angular/common/http/src/client' { | |
| export interface HttpClient { | |
| hideLoader(hide?: boolean): HttpClient; | |
| } | |
| } |
| import { InjectionToken } from '@angular/core'; | |
| import { HttpClient, HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http'; | |
| import { Observable } from 'rxjs'; | |
| declare module '@angular/common/http/src/client' { | |
| export interface HttpClient { | |
| hideLoader(hide?: boolean): HttpClient; | |
| } |
| @Injectable() | |
| export class HttpService extends HttpClient { | |
| constructor(private httpHandler: HttpHandler, | |
| private injector: Injector, | |
| @Optional() @Inject(HTTP_DYNAMIC_INTERCEPTORS) private interceptors: HttpInterceptor[] = []) { | |
| super(httpHandler); | |
| if (!this.interceptors) { | |
| // Configure default interceptors that can be disabled here |
| providers: [ | |
| { provide: HttpClient, useClass: HttpService }, | |
| ], |
| public getAutoCompleteResult(term: string) { | |
| return this.httpClient | |
| .hideLoader() | |
| .get(`http://my-domain/api/autocomplete`); | |
| } |
| { | |
| "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json", | |
| "schematics": { | |
| "my-schematics": { | |
| "description": "A blank schematic.", | |
| "factory": "./my-schematics/index#mySchematics" | |
| } | |
| } | |
| } |
| import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; | |
| // You don't have to export the function as default. You can also have more than one rule factory | |
| // per file. | |
| export function mySchematics(_options: any): Rule { | |
| return (tree: Tree, _context: SchematicContext) => { | |
| return tree; | |
| }; | |
| } |
| import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; | |
| // You don't have to export the function as default. You can also have more than one rule factory | |
| // per file. | |
| export function mySchematics(_options: any): Rule { | |
| return (tree: Tree, _context: SchematicContext) => { | |
| tree.create(_options.name || 'hello', 'world'); | |
| return tree; | |
| }; | |
| } |
| { | |
| "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json", | |
| "extends": ["@schematics/angular"], | |
| "schematics": { | |
| "my-schematics": { | |
| "description": "A custom module generator.", | |
| "factory": "./my-schematics/index#mySchematics", | |
| "schema": "./my-schematics/schema.json" | |
| } | |
| } |