In config/environment.js:
// config/environment.js
'use strict';
/*
* Mostly this is the stock module config.| 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); | |
| } |
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!
| <?php namespace Console; | |
| use Symfony\Component\Console\Input\InputArgument; | |
| use Symfony\Component\Console\Input\InputInterface; | |
| use Symfony\Component\Console\Input\InputOption; | |
| use Symfony\Component\Console\Output\OutputInterface; | |
| use Console\Command; | |
| /** | |
| * Author: Chidume Nnamdi <kurtwanger40@gmail.com> | |
| */ |
| <?php namespace Console; | |
| use Symfony\Component\Console\Command\Command as SymfonyCommand; | |
| use Symfony\Component\Console\Input\InputArgument; | |
| use Symfony\Component\Console\Input\InputInterface; | |
| use Symfony\Component\Console\Input\InputOption; | |
| use Symfony\Component\Console\Output\OutputInterface; | |
| /** | |
| * Author: Chidume Nnamdi <kurtwanger40@gmail.com> | |
| */ |
| import 'core-js' | |
| import * as functions from 'firebase-functions' | |
| import * as admin from 'firebase-admin'; | |
| import * as cors from 'cors' | |
| import * as express from 'express' | |
| admin.initializeApp(functions.config().firebase) | |
| var contactsRef: admin.database.Reference = admin.database().ref('/contacts') | |
| exports.addContact = functions.https.onRequest((request: any, response: any) => { |
| //This file includes polyfills neede by TypeScript when using es2017, es6 or any above es5 | |
| // This file is loaded before the app. You can add your own extra polyfills to this file | |
| import 'core-js' |
| import axios from 'axios' | |
| import chalk from 'chalk' | |
| import * as ora from 'ora' | |
| const url: string = "https://us-central1-myreddit-clone.cloudfunctions.net" | |
| export const addContact = (answers: any) => { | |
| (async () => { | |
| try { | |
| const spinner = ora('Adding contact ...').start(); |