Skip to content

Instantly share code, notes, and snippets.

View amcdnl's full-sized avatar

Austin amcdnl

View GitHub Profile
import { Injectable } from '@angular/core';
import { NgControl } from '@angular/forms';
/**
* Inspired by https://goo.gl/Xrhoku
*/
@Injectable()
export class RadioControlRegistry {
private _accessors: any[] = [];
import { Directive, HostBinding, HostListener, ElementRef } from '@angular/core';
import { KeyboardNavigationDirective } from './keyboard-navigation.directive';
@Directive({
selector: '[keyboardNavigationItem]'
})
export class KeyboardNavigationItemDirective {
@HostBinding('attr.tabindex') tabIndex = -1;
import {
Component,
ChangeDetectionStrategy,
Input,
AfterViewInit,
TemplateRef,
ViewChild,
OnInit,
EmbeddedViewRef,
OnChanges,
import { __decorate, __metadata } from 'tslib';
import { NavigationCancel, NavigationError, Router, RoutesRecognized } from '@angular/router';
import { Action, Selector, State, Store, NgxsModule } from '@ngxs/store';
import { of } from 'rxjs';
import { NgModule } from '@angular/core';
console.log('Ignoring me webpack??');
var RouterStateSerializer = /** @class */ (function () {
fit('should throw error', async(() => {
const spy = jasmine.createSpy('action spy');
@State<number>({
name: 'counter',
defaults: 0
})
class MyState {
@Action(Increment)
increment() {
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {ArrayDataSource, CollectionViewer, DataSource, ListRange} from './collections';
import {

Virtual Scroll Feedback

  1. Need a null check here - https://github.com/angular/material2/blob/virtual-scroll/src/cdk-experimental/scrolling/virtual-for-of.ts#L71
  2. Passing observable doesn't work - https://github.com/angular/material2/blob/virtual-scroll/src/cdk-experimental/scrolling/virtual-for-of.ts#L74
  3. Need coherse this - [itemSize]="50"
  4. Autosize throws error: Uncaught TypeError: view.rootNodes[j].getBoundingClientRect is not a function
  5. measure bottle neck performance - https://www.screencast.com/t/sXrrAEVN
  6. Make this lazy so if the offset hasn't changed since last, don't update - https://www.screencast.com/t/BZiR2LTYro ===> proposal - https://www.screencast.com/t/xhXla83Yd
> ng s --proxy-config proxy.conf.json --prod
****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.
DON'T USE IT FOR PRODUCTION!
****************************************************************************************
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Date: 2018-04-05T21:15:55.662Z
import { Directive, ViewContainerRef, ElementRef, Input, TemplateRef, OnInit, OnDestroy, NgZone } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { Overlay, OverlayRef, OriginConnectionPosition, OverlayConnectionPosition } from '@angular/cdk/overlay';
import { fromEvent } from 'rxjs/observable/fromEvent';
import { takeUntil } from 'rxjs/operators';
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
import { PopoverComponent } from './popover.component';
import { Subscription } from 'rxjs/Subscription';
@Directive({
{
// Return an array of errors since there could be multiple errors
// for a single request
"errors":[
{
// Error code for the type of error
"code": 215,
// General message of the error, doesn't have to be anything fancy
// as the UI typically handles mapping codes to a nicer format