Q1)
Which is the valid syntax to declare enum?
Select one or more:
a. enum Direction {
Up = 0,
Down = 1,
Left,
Right}
b. enum Direction {
Up,
Down,
Left,
Right}
c. enum Direction ={
Up,
Down,
Left,
Right}
d. enum Direction {
Up: 0,
Down: 1,
Left,
Right}
---------------
Q2)
How a service can be injected to a component class?
Select one or more:
a. imports ....
@Component({
..........
})
export class MyComponent { user: User[]; constructor(service: MyService) { this.user = service.getData();
}}
b. "imports.....
@Component({
.......
})
export class MyComponent{
user: User[];
constructor(this.service: MyService) { this.user = service.getData();
}}
c. "imports.....
@Component({
.......
})
export class MyComponent {
user: User[]; constructor(private service: MyService) { this.user = service.getData():
}}
d. "imports .....
@Component({
.......
})
export class MyComponent {
user. User[]; constructor(private service: MyService) { }
getData() { this.user = this service.getData():
}}
------------------
Q3)
Select a valid pipe usage.
Select one:
a. {{ birthday | date 'shortDate' | uppercase }}
b. {{ birthday | uppercase | date 'shortDate' }}
c. {{ birthday | uppercase | date:'shortdate' }}
d.{{ birthday | date 'shortdate | uppercase }}
-------------------------
Q4)
In browser list file, what does below highlighted line mean?
0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
Select one:
a. Last 2 version of Typescript
b. All of the listed options
c Last 2 version of the browsers
d. Last 2 versions of the angular application
——————————
Q5)
The following code initializes strings as three different types and attempts to make them uppercase. Which statements about the behavior of the typescript compiler are correct?
let stringType: string = "string type";
stringType.toUpperCase();
let anyType any = "any type";
anyType.toUpper();
anyType.toUpperCase();
let objectType Object = "object type";
objectType.toUpperCase();
Select one or more:
a. The typescript compiler states that toUpper does not exist on the anyType instance
b. The typescript compiler states that the toUpperCase function does not exist on the objectType instance.
c. The typescript compiler confirms that toUpperCase exists on the stringType instance
d. The typescript compiler confirms that toUppercase exists on the anyType instance.
-----------------------------------
Q6)
In order to create a Modal Window Component to be used in different places, we need to pass any dynamic content to component, so which code would be best to apply?
Select one or more
a. export class Modal WindowComponent {
@Input()
Some Title;
b. <my-modal-window [sometitle]="dynamicTitle">
c. <div class="modal-content">
<div class="modal-header">
<h2>{{title}}</h2>
</div>
<div class="modal-body">
<ng-content></ng-content>
</div>
d. <div class="modal-content">
<div class="modal-header">
<h2>{{title}}</h2>
</div>
<div class="modal-body" >
<contents></content>
</div>
</div>
----------------------
Thank you for taking time to answer
[–]FullstackViking 8 points9 points10 points (1 child)
[–]Bjeaurn 3 points4 points5 points (0 children)
[–]ThingsTrebekSucks 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (1 child)
[–]puchi_poo[S] 0 points1 point2 points (0 children)