This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as ng from '@angular/platform' | |
function todoAppState(state = {todos: [1,2,3]}, action = {type:''}){ | |
switch (action.type) { | |
case 'ADD_TODO': | |
return { | |
todos: state.todos.concat((action as any).payload), | |
...state | |
} | |
default: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** | |
* @ngdoc module | |
* @name sails.io | |
* @file angular-sails-io.js | |
* | |
* @description | |
* | |
* This file allows you to send and receive socket.io messages to & from Sails |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | |
typeof define === 'function' && define.amd ? define(['exports'], factory) : | |
(factory((global.lit = {}))); | |
}(this, (function (exports) { 'use strict'; | |
/** | |
* @license | |
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved. | |
* This code may only be used under the BSD style license found at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Action { | |
type: string; | |
} | |
enum UserActions { | |
ADD_USER = 'ADD_USER', | |
DELETE_USER = 'DELETE_USER' | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe(‘My Effects’, () => { | |
let effects: MyEffects; | |
let actions: Observable<any>; | |
beforeEach(() => { | |
TestBed.configureTestingModule({ | |
providers: [ | |
MyEffects, | |
provideMockActions(() => actions), | |
// other providers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
imports: [ | |
StoreModule.forRoot(appReducers), | |
EffectsModule.forRoot([SourceA, SourceB]), | |
RouterModule.forRoot([ | |
{ path: ‘lazy’, loadModule: ‘./lazy.module#LazyModule’ } | |
]) | |
] | |
}) | |
export class AppModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {InjectionToken} from '@angular/core' | |
import {Http} from '@angular/http' | |
import {Observable} from 'rxjs/Rx' | |
//simple fn | |
export function AddDrama(value:string){ | |
return `${value}!!!` | |
} | |
export const AddDramaProvider = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//hacked up view engine parts | |
import {ComponentFactory, ComponentRef} from './core/linker/component_factory'; | |
import {ErrorHandler} from './core/error_handler'; | |
import {Injector} from './core/di/injector'; | |
import {NgModuleRef} from './core/linker/ng_module_factory'; | |
import {RendererFactory2} from './core/render/api'; | |
import {Sanitizer} from './core/security'; | |
import {initServicesIfNeeded} from './core/view/index'; | |
import {SimpleRendererFactory} from './core/renderer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {NgModule, Component} from '@angular/core' | |
import {BrowserModule} from '@angular/platform-browser' | |
@Component({ | |
selector: 'demo-app', | |
template: ` | |
<h1>hello {{name}}</h1> | |
` | |
}) | |
export class DemoApp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"summaries": [ | |
{ | |
"symbol": { | |
"__symbol": 0, | |
"members": [] | |
}, | |
"metadata": { | |
"__symbolic": "class" | |
}, |