Developers often miss the opportunity to express permissions as a collection of enumerated bitflags; where complex permissions can be easily grouped by context.
Consider the scenario where a user may have 30 or more permission flags.
Developers often find scenarios where they are compelled to manaully subscribe to Observables in View components; these scenarios do not use the async pipe levels of manual subscription management. These manual subscriptions can lead to:
/** | |
* When manually subscribing to an observable in a view component, developers are traditionally required | |
* to unsubscribe during ngOnDestroy. This utility method auto-configures and manages that relationship | |
* by watching the DOM with a MutationObserver and internally using the takeUntil RxJS operator. | |
* | |
* Angular 7 has stricter enforcements and throws errors with monkey-patching of view component life-cycle methods. | |
* Here is an updated version that uses MutationObserver to accomplish the same goal. | |
* | |
* @code | |
* |
Facades are a programming pattern in which a simpler public interface is provided to mask a composition of internal, more-complex, component usages.
When writing a lot of NgRx code - as many enterprises do - developers quickly accumulate large collections of actions and selectors classes. These classes are used to dispatch and query [respectively] the NgRx Store.
Using a Facade - to wrap and blackbox NgRx - simplifies accessing and modifying your NgRx state by masking internal all interactions with the Store
, actions
, reducers
, selectors
, and effects
.
For more introduction, see Better State Management with Ngrx Facades
Typical coding example for a sequence of asynchronous REST calls:
function update(ev, updateDiff) {
// get current event from Back End
return scheduleService.getEvent(ev.id).then(function(event) {
// send updates to Back end
return scheduleService.editEvent(ev.id, event.version, updateDiff).then(function(evt) {
var pack = findAircraftPackById(evt.aircraft.id);
These rules are adopted from the Angular commit conventions.
# remove local tag | |
git tag -d tagname-123 | |
# remove remote tag | |
git push origin :refs/tags/tagname-123 | |
# delete multiple tags by patterns | |
for tag in $(git tag -l '[production|tusur]*'); do git tag -d $tag; git push origin :refs/tags/$tag; done |
The interview questions below are grouped by category and each category lists questions in easy-to-hard order.
Interviews should ask the candidate to self-assess their skills/experience. Based on the candidate's response, the interviewer can jump to the appropriate section.
Some basic questions going from easy to difficult. A more exhaustive list of more questions from the community can be found here.
import {Component, OnInit} from '@angular/core'; | |
import {ActivatedRoute} from '@angular/router'; | |
import {ContactsService} from '../contacts.service'; | |
import {Contact} from '../models/contact'; | |
import 'rxjs/add/operator/switchMap'; | |
import {Subscription} from 'rxjs'; | |
@Component({ | |
selector: 'trm-contacts-detail', |