By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| <style type="text/css"> | |
| /* | |
| * Allows to usage of <ul> as .row and <li> as .col-**-* | |
| * Benefit of using <li> is that the column can be of varied height, | |
| * unlike when using div.row - columns collapse when heights are different. | |
| * The tricky part is to eliminate whitespaces between <li></li> tags. | |
| * | |
| * Usage: <ul class="list-grid row"> | |
| * <li class="col-md-3">...</li> | |
| * |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| /** | |
| * Sorts an array of objects In-Place, | |
| * sorting by multiple fields sequentially. | |
| * | |
| * @description This function is meant to be used | |
| * with arrays of objects, AND when you need to set | |
| * multiple sorting criteria. For other cases it is | |
| * recommended to use the native method `array.sort(callback)` | |
| * since for simple cases this function is more expensive | |
| * in time and memory. |
| import {PipeTransform, Pipe} from 'angular2/core'; | |
| @Pipe({ name: 'highlight' }) | |
| export class HighLightPipe implements PipeTransform { | |
| transform(text: string, [search]): string { | |
| return search ? text.replace(new RegExp(search, 'i'), `<span class="highlight">${search}</span>`) : text; | |
| } | |
| } | |
| /** Usage: |
| <!-- Add this code if you would like accordions on your Category Page --> | |
| <div class="container-divider"></div> | |
| <div class="container"> | |
| <nav class="sub-nav"> | |
| {{breadcrumbs}} | |
| {{search submit=false}} | |
| </nav> | |
| (function (window, document, Chartist) { | |
| 'use strict'; | |
| function AutoScaleAxis(axisUnit, data, chartRect, options) { | |
| // Usually we calculate highLow based on the data but this can be overriden by a highLow object in the options | |
| var highLow = options.highLow || Chartist.getHighLow(data.normalized, options, axisUnit.pos); | |
| this.bounds = Chartist.getBounds(chartRect[axisUnit.rectEnd] - chartRect[axisUnit.rectStart], highLow, options.scaleMinSpace || 20, options.onlyInteger); | |
| var scale = options.scale || 'linear'; |
| import getYear from 'date-fns/get_year' | |
| import getMonth from 'date-fns/get_month' | |
| import addDays from 'date-fns/add_days' | |
| import startOfWeek from 'date-fns/start_of_week' | |
| const rows = range(6) | |
| const cols = range(7) | |
| /** | |
| * Returns a two-dimensional array with calendar represented dates |
| <md-input-container class="admin-form"> | |
| <input md-input placeholder="Block Title" nfNoSpaces [(ngModel)]="block.title" id="block-{{ block.id }}-input-name" name="title" | |
| #title="ngModel"> | |
| <md-hint [ngStyle]="{'color': 'red'}" align="start" *ngIf="!title.valid && !title.pristine">Title is required.</md-hint> | |
| </md-input-container> | |
| Be sure to include ref to directive in module declarations array. |
You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.
However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.