LinkedIn Angularjs Assessment Answers
The LinkedIn Skill Assessments feature allows you to demonstrate your knowledge of the skills you’ve added to your profile. Job posters on LinkedIn can also add Skill Assessments as part of the job application process. This allows job posters to more efficiently and accurately verify the crucial skills a candidate should have for a role.
The topics in the AngularJS assessment include:
- Components and Directives
- Template Syntax
- Dependency Injection
- Routing
- Forms
- Testing
- Modules
- HTTP
Question Format
Multiple Choice
Language
English
LinkedIn Angularjs Assessment Questions and Answers
- It 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.
- It indicates that the <p> tag be rendered as a child of the parent view that uses this component.
- It makes the <p> tag in the template support content projection.
- It 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.
- Add the string name given to the FormControl to an attribute named controls on the element to indicate what fields it should include.
- Use the square bracket binding syntax around the value attribute on the DOM element and set that equal to an instance of the FormControl.
- Use the form control name directive and set the value equal to the string name given to the FormControl.
- Use the string name given to the FormControl as the value for the DOM element id attribute.
- The paramMap is an object literal of the parameters in a route's URL path. The queryParamMap is an Observable of those same parameters.
- The 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.
- paramMap is the legacy name from Angular 3. The new name is queryParamMap.
- Both 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.
- None. The async pipe does not subscribe automatically. None.
- None. The template syntax is not correct.
- Three. There is one for each async pipe.
- One. The async pipe caches Observables by type internally.
- this.httpClient.url(this.orderUrl).post(order);
- this.httpClient.send(this.orderUrl, order);
- this.httpClient.post(this.orderUrl, order);
- this.httpClient.post(this.orderUrl, order).subscribe();
- Registering any providers that you intend to use in routed components.
- Registering route definitions at the root application level.
- Indicating that Angular should cheer on your routes to be successful.
- Declaring that you intend to use routing only at the root level.
- Any element with the attribute app-user-card, such as <div app-user-card></div>.
- The first instance of <app-user-card></app-user-card>.
- All instances of <app-user-card></app-user-card>.
- All instances of <user-card></user-card>.
- [ ] <ul>
- [ ] <ul>
- [x] <ul>
- [ ] <ul>
- viewEncapsulation and viewEncapsulationFiles.
- There is only one and it is the property named CSS.
- CSS and cssUrl.
- styles and styleUrls.
- {{ 'title' }}
- {{ title }}
- [title]
- A class field cannot be displayed in a template via the template syntax.
- It is used to configure what values are allowed for the control.
- It is used to change the value of a control to a new value. You would call that method and pass in the new value for the form field. It even supports passing in an array of values that can be set over time.
- It returns a Boolean based on if the value of the control is different from the value with which it was initialized.
- It is observable that emits every time the value of the control changes, so you can react to new values and make logical decisions at that time.
- routeTo
- routerLink
- routePath
- appLink
- It makes the itemTotalChanged class field public.
- It provides a way to bind values to the itemTotalChanged class field, like so: <app-shopping-cart [itemTotalChanged]="newTotal"></app-shopping-cart>.
- It provides a way to bind events to the itemTotalChanged class field, like so: <app-shopping-cart (itemTotalChanged)="logNewTotal($event)"></app-shopping-cart>.
- It is simply a way to put a comment in front of a class field for documentation.
- The ngIf is shorthand for the other example. When Angular processes that directive, it writes a div element to the DOM with the hidden property.
- They are fundamentally the same.
- The ngIf directive does not render the div in the DOM if the expression is false. The hidden property usage hides the div content in the browser viewport, but the div is still the DOM.
- The ngIf is valid, but the use of the hidden property is wrong and will throw an error.
- [ ] <button (click)="submit(userForm.value)" disable="userForm.invalid">
- [x] <button (click)="submit(userForm.value)" [disabled]="userForm.invalid">
- [ ] <button (click)="submit(userForm.value)" [ngForm.disabled]="userForm.valid">
- [ ] <button (click)="submit(userForm.value)" *ngIf="userForm.valid">
- ng generate component contact-card --dry-run
- ng generate component contact-card --no-files
- ng generate component component --dry
- ng generate component --exclude
- <h1 data-title="titleText">{{ titleText }}</h1>
- <h1 title="titleText">{{ titleText }}</h1>
- <h1 [title]="titleText">{{ titleText }}</h1>
- <h1 titleText>{{ titleText }}</h1>
- loggers for tracking the health of an Angular app
- providers that can be used to track the instances of components
- built-in pipes that can be used in templates for DOM events
- reserved named methods for components and directives that Angular will call during set times in its execution, and can be used to tap into those lifecycle moments
- The ? is shorthand for the async pipe. The job value must be Observable.
- It is using the safe navigation operator (?) on the job field. If the job field is undefined, the access to the boy's name will be ignored and no error will occur.
- There is an error in the template syntax. The ? is not valid here.
- It is displaying the job value if it has one; otherwise, it is displaying the boss's name.
- { path: 'user/:id', component: UserDetailComponent }
- { url: 'user/:id', routedComponent: UserDetailComponent }
- { routedPath: 'user/:id', component: UserDetailComponent }
- { destination: new UserDetailComponent(), route: 'user/:id' }
- They are setting the CalloutDirective.font-weight field based on whether or not the mouse is over the DOM element. The HostListener then sets the font-weight CSS property to the font-weight value.
- They are setting up the directive to check the DOM element that it is on. If it has event bindings added for mouse enter and leaves it will use this code. Otherwise, nothing will happen.
- This is an incorrect use of HostListener and HostBinding. The HostListener and HostBinding decorators do not do anything on directives; they work only when used on components.
- If the DOM element that this directive is placed on has the CSS property font-weight set on it, the mouseenter and mouseleave events will get raised.
- You can make use of a template reference variable and the exports feature that the ngModel directive has.
- You can use the ngModel directive in combination with the input field name.
- You can use a template reference variable for the HTML input element and then check the valid property off of that.
- It is not possible to get access to the field value with template-driven forms. You must use reactive forms for that.
- an Angular ElementRef, a wrapper around a native element
- the inner text of the <h1> element
- a header component class
- the native DOM element type of HTMLHeadingElement
- They are the same. Both will result in a new instance of Logger that is bound to the FormattedLogger token.
- The useClass syntax tells the injector to make a new instance of Logger and bind that instance to the FormattedLogger token. The useExisting syntax refers to an already existing object instance declared as Logger.
- Both of them are wrong. A strong type connot be used for useClass or useExisting.
- They are the same. Both will result in the FormattedLogger token being an alias for the instance of Logger.
- a key/value mapping for setting @Input values on the routed component instance
- a way to include static, read-only data associated with the route that can be retrieved from the ActivatedRoute
- a property on the route that can be used to load dynamic data for the route
- an object that will get auto-injected into the routed component's constructor.
- ==============================================
No comments:
Post a Comment