System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
sudo apt-get update | |
sudo apt-get install nginx | |
# default website |
public class ApiControllerCustomization : ICustomization | |
{ | |
public void Customize(IFixture fixture) | |
{ | |
fixture.Register<ICompositeMetadataDetailsProvider>(() => new CustomCompositeMetadataDetailsProvider()); | |
fixture.Inject(new ViewDataDictionary(fixture.Create<DefaultModelMetadataProvider>(), fixture.Create<ModelStateDictionary>())); | |
} | |
private class CustomCompositeMetadataDetailsProvider : ICompositeMetadataDetailsProvider | |
{ |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
<h1>Angular 2 Recursive List</h1> | |
<ul> | |
<ng-template #recursiveList let-list> | |
<li *ngFor="let item of list"> | |
{{item.title}} | |
<ul *ngIf="item.children.length > 0"> | |
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container> | |
</ul> | |
</li> | |
</ng-template> |
An updated guide/collection of guides on how to access JSON data with JavaScript
Original Question on Stack Exchange.
For reading the external Local JSON file (data.json) using java script
// Import the core angular services. | |
import { Component } from "@angular/core"; | |
// Import the application components and services. | |
import { FriendService } from "./friend.service"; | |
import { IFriend } from "./friend.service"; | |
import { PouchDBService } from "./pouchdb.service"; | |
interface IAddForm { | |
name: string; |
request.onupgradeneeded = function(event) { | |
var db = event.target.result; | |
var upgradeTransaction = event.target.transaction; | |
var objectStore; | |
if (!db.objectStoreNames.contains("my-store")) { | |
objectStore = db.createObjectStore("my-store"); | |
} else { | |
objectStore = upgradeTransaction.objectStore('my-store'); | |
} |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log
in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
/** | |
* @param {object} scope - Object that all bound data will be attached to. | |
*/ | |
function twoWayBind(scope) { | |
// a list of all bindings used in the DOM | |
// @example | |
// { 'person.name': [<input type="text" data-bind="person.name"/>] } | |
var bindings = {}; | |
// each bindings old value to be compared for changes |
Below is the list of modern JS frameworks and almost frameworks – React, Vue, Angular, Ember and others.
All files were downloaded from https://cdnjs.com and named accordingly.
Output from ls
command is stripped out (irrelevant stuff)
$ ls -lhS
566K Jan 4 22:03 angular2.min.js