Execute the following commands to install Node, npm, git, Java, Ionic, Cordova and Angular CLI:
cd ~
sudo apt update
sudo apt upgrade
| import { Pipe, PipeTransform } from '@angular/core'; | |
| @Pipe({ | |
| name: 'truncateText' | |
| }) | |
| export class TruncateTextPipe implements PipeTransform { | |
| transform(value: string, limit: number = 40, trail: String = '…'): string { | |
| let result = value || ''; |
| rem see https://github.com/coreybutler/nvm-windows/issues/300 | |
| @echo off | |
| SETLOCAL EnableDelayedExpansion | |
| if [%1] == [] ( | |
| echo Pass in the version you would like to install, or "latest" to install the latest npm version. | |
| ) else ( | |
| set wanted_version=%1 |
You can use the tuple() function in tuple.ts to infer tuple types in TypeScript and cut down on the need to repeat yourself. Without tuple(), declaring a constant of a tuple type looks like this:
const daysOfTheWeek: ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"] =
["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];You can't do this:
const daysOfTheWeek = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]; This works in a python 3.6 environment with bokeh and flask installed. To use this you need the following directory structure:
app/
- templates/
- hello.html
- bokeh-slider.py
- hello.py
After that you need to open two terminals at app/, in the first one you need to run the bokeh server with the command:
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
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
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |