100% found this document useful (1 vote)
239 views10 pages

(25-APRIL-24) Angular With Typescript (7062)

Figured t6

Uploaded by

shambayismail
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
239 views10 pages

(25-APRIL-24) Angular With Typescript (7062)

Figured t6

Uploaded by

shambayismail
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Angular with Typescript (7062)

Q. 1 What is the use of .subscribe?

A. streams the data asynchronously B. streams the data synchronously

C. both D. None of these

Correct Answer:

Q. 2 How can you disable the submit button when the form has errors in the template-driven forms?

A. <input type=submit, value="Submit" B. <input type=submit, value="Submit"


id="button" disable="myForm.invalid"> id="button" [disabled]="myForm.invalid">

C. <input type=submit, value="Submit" D. <input type=submit, value="Submit"


id="button" [ngForm.disabled="myForm.valid"> id="button" *ngIf"myForm.invalid">

Correct Answer:
Reference: HEADING 7.6 PAGE NO.218

Q.3 What is used to install TypeScript?

A. npm B. nnm

C. npp D. mpm

Correct Answer:
Reference: PAGE NO.13

Q. 4 Angular 14 was released in which year?

A. 2-Jun-22 B. 4-Nov-21

C. 12-May-21 D. 11-Nov-20

Correct Answer:
Reference: TABLE 2.1 PAGE NO.39

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)
Q. 5 Which scenario is not suited for Angular use?

A. Static content not requiring customization by


B. Legacy browser environment
the user

C. Strong security requirements D. All of these

Correct Answer:
Reference: PAGE NO.40

Q. 6 To terminate the live development server, developers have to run which command?

A. ng serve B. ctrl+c

C. ng build D. ng -v

Correct Answer:
Reference: FIGURE 2.7 PAGE NO.47

Q.7 Which command is used to get or set the value of Angular configuration?

A. ng generate B. ng new <project-name>

C. ng config D. ng run<target>

Correct Answer:
Reference: PAGE NO.52

Q. 8 What are building blocks of an application and subset of directives?

A. Model B. Viewpoints

C. Controller D. Components

Correct Answer:
Reference: HEADING 3.1.1 PAGE NO. 59

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Q. 9 Which property is used to embed a separate HTML file and refer it to the component without an
inline template code?

A. TemplateURL B. Template

C. HTML code D. metadata

Correct Answer:
Reference: HEADING 3.4.1 PAGE NO.65

Q. 10 What lifecycle hook can be used on a component to monitor all changes to @Input values on
that component?

A. ngOnInit B. ngOnChanges

C. ngChanges D. ngAfterInputChange

Correct Answer:
Reference: HEADING 3.7.3 PAGE NO.81

Q.11 ________ works as placeholder for a future value to put in.

A. Promise B. Observables

C. Resolve D. Reject

Correct Answer:
Reference: PAGE NO.95

Q. 12 _______ acts like a contract or syntax for classes to follow.

A. classes B. interface

C. decorators D. modules

Correct Answer:
Reference: PAGE NO.99

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Q. 13 TypeScript has _____ mechanism which performs type checking.

A. type assertion B. type checking

C. transpilation D. arrow function

Correct Answer:
Reference: PAGE NO.105

Q. 14 Using _____, one can pass data from component class to view template or vice versa.

A. property binding B. string interpolation

C. event binding D. data binding

Correct Answer:
Reference: PAGE NO.108

Q.15 Which directive is used to loop over an iterable?

A. ngFor B. ngRepeat

C. ngIterate D. ngRepeats

Correct Answer:
Reference: HEADING 5.2 PAGE NO.132

Q. 16 Which service is used to make the request to the server?

A. request B. http

C. https D. requests

Correct Answer:
Reference: PAGE NO. 180

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Q. 17 One can subscribe to the observables using the _______ method.

A. subs() B. subscribe()

C. subscribed() D. None of these

Correct Answer:
Reference: PAGE NO.181

Q. 18 Which decorator is used to access the component or directive from the view template in the
component class?

A. ViewChildren B. ContentChildren

C. Content Child D. ViewChild

Correct Answer:
Reference: HEADING 3.8 PAGE NO. 85

Q.19 Which directive is used to bind the value of HTML to application?

A. ngModel B. ngApp

C. ngInit D. ngHide

Correct Answer:
Reference: PAGE NO.117

Q. 20 Which of the following statement specifies data binding?

A. It is a communication of data between model B. It is a communication of data between model


and controller components and view components

C. It is a communication of data between view


D. None of these
and controller components

Correct Answer:
Reference: PAGE NO.117

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Q. 21 The _________ directive substitutes the normal href property and makes it easier to work with
route links in Angular 2. Moreover, if we want to navigate between routes, we use the _________
directive.

A. routerLinks B. routerLinking

C. routerLink D. routerLinq

Correct Answer:
Reference: PAGE NO.247

Q. 22 The _________ directive is used to display views for a given route.

A. routerAngle B. routerLink

C. routerState D. routerOutlet

Correct Answer:
Reference: PAGE NO.270

Q.23 A _________ contains the information about a route associated with a


component loaded in an outlet.

A. NavigationRoute B. Activatedroute

C. NavigateRoute D. ActiveRoute

Correct Answer:

Q. 24 Route _________ allow us to pass values in our url to our component so we


can dynamically change our view content.

A. parameters B. pipes

C. modules D. variables

Correct Answer:
Reference: PAGE NO.257

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Q. 25 By default, the position of the tooltip is at the _________ of the element.

A. center B. bottom

C. left D. right

Correct Answer:
Reference: PAGE NO.290

Q. 26 By default, the color of the radio button is _________.

A. primary B. warn

C. accent D. none of these

Correct Answer:
Reference: PAGE NO.289

Q.27 Which module is imported to use check box?

A. MatCheckboxModule B. MatSelectModule

C. MatInputModule D. MatFormFieldModule

Correct Answer:
Reference: PAGE NO.289

Q. 28 TypeScript programming language is powered by______.

A. Google B. Microsoft

C. TypeScript D. Oracle

Correct Answer:
Reference: HEADING 1.1 PAGE NO.8

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Q. 29 Which data type indicates no value?

A. Enum B. tuple

C. array D. never

Correct Answer:
Reference: PAGE NO.15

Q. 30 ____________ datatype can hold any data when a variable type is not provided.

A. any B. void

C. null D. undefined

Correct Answer:

Q.31 What allows to inspect the existence of a value in the set?

A. set.size() B. set.clear()

C. set.add() D. set.has()

Correct Answer:
Reference: TABLE 1.4 PAGE NO.32

Q. 32 Which lifecycle hook is called even if there is no change in input bound


properties?

A. ngDoCheck B. ngOnChanges

C. ngChanges D. ngOnInit

Correct Answer:
Reference: PAGE NO.82

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Q. 33 What prefix is used with Angular directives?

A. ag B. aj

C. ng D. All of these

Correct Answer:

Q. 34 One can use the ngFor and ngIf directives using the _________ symbol to indicate we are
dealing with a directive that creates a template.

A. hash (#) B. escape (/)

C. asterisk (*) D. percent (%)

Correct Answer:
Reference: PAGE NO. 136

Q.35 The two types of directives in Angular are _________.

A. structural B. attribute

C. components D. advanced

Correct Answer:
Reference: HEADING 5.4 PAGE NO. 136

Q. 36 Structural directives change the DOM layout by adding and removing


DOM elements and the _______ directives change the appearance or behavior of
an element.

A. advanced B. component

C. attribute D. same

Correct Answer:
Reference: HEADING 5.4 PAGE NO. 136

Q: 37One can subscribe to an observable using the

pipe.

A. sync pipe B. async var

C.ssync pipe D.syn var

Page PAGE 1 of NUMPAGES 9


Angular with Typescript (7062)

Correct Answer:

38. There are five major operations of Routing architecture. Select the correct order of operations
from the following:

39. i. Activate the view using router-outlet.

40. ii. Recognize the status of the router.

41. iii. Execute the guards and data resolutions or process guards and resolvers.

42. iv. When Angular routing receives the URL, it applies the redirect URL.

43. v. Navigate and update browser's location.

A. i, ii, iii, iv, v B. ii, iii, i, iv, v

C. iv, ii, iii, i, v D. iii, i, iv, ii, v

Correct Answer:

Page PAGE 1 of NUMPAGES 9

You might also like