O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

Q1-Q20

Nouri Atef 20 perguntas Atualizado em 17 jul 2022

Fazer o quiz

Este quiz tem tempo limite, por isso abre no player de sempre.

Perguntas do quiz (20)

  1. 1 What is the purpose of the ViewChild decorator in this component class?
    Imagem da pergunta 1
    1. AIt provides access from within the component class to the ElementRef object for the <p> tag that has the bio template reference variable in the component's template view.
    2. BIt indicates that the <p> tag be rendered as a child of the parent view that uses this component.
    3. CIt makes the <p> tag in the template support content projection.
    4. DIt makes the <p> tag visible in the final render. If the #bio was used in the template and the @ViewChild was not used in the class, then Angular would automatically hide the <p> tag that has #bio on it.
  2. 2 What method is used to wire up a FormControl to a native DOM input element in reactive forms?
    1. AAdd the string name given to the FormControl to an attribute named controls on the element to indicate what fields it should include.
    2. BUse the square bracket binding syntax around the value attribute on the DOM element and set that equal to an instance of the FormControl.
    3. CUse the formControlName directive and set the value equal to the string name given to the FormControl.
    4. DUse the string name given to the FormControl as the value for the DOM element id attribute.
  3. 3What is the difference between the "paramMap" and the "queryParamMap" on the ActivatedRoute class?
    1. AThe paramMap is an object literal of the parameters in a route's URL path. The queryParamMap is an Observable of those same parameters.
    2. BThe paramMap is an Observable that contains the parameter values that are part of a route's URL path. The queryParamMap is a method that takes in an array of keys and is used to find specific parameters in the paramMap.
    3. CparamMap is the legacy name from Angular 3. The new name is queryParamMap.
    4. DBoth are Observables containing values from the requested route's URL string. The paramMap contains the parameter values that are in the URL path and the queryParamMap contains the URL query parameters.
  4. 4Based on the following usage of the async pipe, and assuming the users class field is an Observable, how many subscriptions to the users Observable are being made?Imagem da pergunta 4
    1. ANone. The async pipe does not subscribe automatically.
    2. BNone. The template syntax is not correct.
    3. CThree. There is one for each async pipe.
    4. DOne. The async pipe caches Observables by type internally.
  5. 5How can you use the HttpClient to send a POST request to an endpoint from within an addOrder function in this OrderService?

    export class OrderService {
    constructor(private httpClient: HttpClient) { }

    addOrder(order: Order) {
    // Missing line
    }
    }
    1. Athis.httpClient.url(this.orderUrl).post(order);
    2. Bthis.httpClient.send(this.orderUrl, order);
    3. Cthis.httpClient.post(this.orderUrl, order);
    4. Dthis.httpClient.post(this.orderUrl, order).subscribe();
  6. 6 What is the RouterModule.forRoot method used for?
    1. ARegistering any providers that you intend to use in routed components.
    2. BRegistering route definitions at the root application level.
    3. CIndicating that Angular should cheer on your routes to be successful.
    4. DDeclaring that you intend to use routing only at the root level.
  7. 7 Which DOM elements will this component metadata selector match on?
    @Component({
    selector: 'app-user-card',
    . . .
    })
    1. AAny element with the attribute app-user-card, such as <div app-user-card></div>.
    2. BThe first instance of <app-user-card></app-user-card>.
    3. CAll instances of <app-user-card></app-user-card>.
    4. DAll instances of <user-card></user-card>.
  8. 8What is the correct template syntax for using the built-in ngFor structural directive to render out a list of productNames?
    1. A<ul>
      <li [ngFor]="let productName of productNames">{{ productName }}</li>
      </ul>
    2. B<ul>
      <li ngFor="let productName of productNames">{{ productName }}</li>
      </ul>
    3. C<ul>
      <li *ngFor="let productName of productNames">{{ productName }}</li>
      </ul>
    4. D<ul>
      <? for productName in productNames { ?>
      <li>{{ productName }}</li>
      <? } ?>
      </ul>
  9. 9 What are the two component decorator metadata properties used to set up CSS styles for a component?
    1. AviewEncapsulation and viewEncapsulationFiles.
    2. BThere is only one and it is the property named css.
    3. Ccss and cssUrl.
    4. Dstyles and styleUrls.
  10. 10With the following component class, what template syntax would you use in the template to display the value of the title class field?

    @Component({
    selector: 'app-title-card',
    template: '',
    })
    class TitleCardComponent {
    title = 'User Data';
    }
    1. A{{ 'title' }}
    2. B{{ title }}
    3. C[title]
    4. DA class field cannot be displayed in a template via the template syntax.

Informações

Descrição
Angular Linkedin Assessments Test Quiz sobre Q1-Q20, criado por Nouri Atef em 18-05-2022.
Idioma
English
Visualizações
0
Histórico
Criado em 18 mai 2022 · atualizado em 17 jul 2022
Etiquetas
angular linkedin assessments test
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?