Posts by victor • 575 points
12 posts
-
0
votes1
answer308
viewsQ: What does "!!" mean in Typescript?
Example: this.autenticator.logarExemplo(form.nome, form.senha, usuario.idx, usuario.idy, !!usuario.login).subscribe( executar tarefas; ); What would be the !! ? This symbol belongs to Typescript…
-
0
votes1
answer558
viewsQ: How does the "next" function work in Angular?
Follow the example: @Output() exemplo = new Subject<{ valor1: number, valor2: number }>(); this.exemplo.next({ valor1: _valor1, valor2: this.valor }); What’s going on here? An object is passed…
-
2
votes1
answer95
viewsQ: What is Simplechanges in Angular? Is it an Angular API?
I have the following code: @Input() listas: IniciarFuncaoModel; ngOnChanges(changes: SimpleChanges): void { if (changes.listas) { this.iniciarFuncao(); } } Simplechanges is an Angular API? I…
-
10
votes2
answers219
viewsQ: Why do we use a "get" before declaring a function in Angular?
Why do we use a get before declaring a function in Angular or Javascript? That’s an Angular practice? get funcaoExemplo() { return this.exemplo.length === (this.exemplo2 + 1); }…
-
1
votes1
answer100
viewsQ: What does the word "of" mean in Rxjs?
What does the word "of" mean in Rxjs ? Example: const source = of('World').pipe( map(x => `Hello ${x}!`) );
-
3
votes1
answer216
viewsQ: Why do we use the type "Static" in a function in Typescript?
Why do we use the word static in a function in Typescript/Angular? Is she a type or just a reserved word? How can we refer to her? Example: export class ClasseExemplo{ static fazerAcaoComponent() {}…
-
12
votes2
answers231
viewsQ: What does " | " mean in Typescript?
I have the following code: export type Teste = Observable<'exemplo' | any>; What the bar means | within the generic argument? Is some kind of comparison any and the string for example?…
-
-1
votes2
answers62
viewsQ: Why do we use the word 'value' in the function?
Because we use the word 'value' in the function? this.x.subscribe(valor => { if(valor){ alert(1); } else{ alert(2); } }); It can be replaced by any other word?…
-
6
votes1
answer133
viewsQ: Why do we use "<>" in Typescript?
Why do we use <> in Typescript? Example: funcaoExemplo(x: X<any>, x: X): Observable<X<any>>
-
0
votes1
answer511
viewsQ: In typescript can we type a variable with an object?
In typescript can we type a variable with an object? Example: funcaoExemplo(obj: { [key: string]: any }) {}
-
0
votes1
answer218
viewsQ: Why do we use "void" typing in Angular?
Why in Angular we use typing : void? Example: ngAfterViewInit(): void {}
-
5
votes1
answer466
viewsQ: Why, at Angular, do we use interrogation?
Because in Angular we use interrogation, for example: *ngIf="listaxpto?.clientes.length"