This file contains hidden or 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
baseTaxonomyCashFlowLinkRole = 'https://www.esma.europa.eu/xbrl/role/all/...' | |
baseTaxonomyCashFlowRels = baseTaxonomyModelXbrl.relationshipSet(XbrlConst.parentChild, baseTaxonomyCashFlowLinkRole) | |
baseTaxonomyCashFlowClarks = { | |
rel.toModelObject.qname.clarkNotation | |
for rel in baseTaxonomyCashFlowRels.modelRelationships | |
} | |
for root in baseTaxonomyCashFlowRels.rootConcepts: | |
baseTaxonomyCashFlowClarks.add(root.qname.clarkNotation) |
This file contains hidden or 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 { | |
OnChanges, | |
OnInit, | |
DoCheck, | |
OnDestroy, | |
AfterContentInit, | |
AfterContentChecked, | |
AfterViewInit, | |
AfterViewChecked, | |
SimpleChanges |
This file contains hidden or 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 {Observable} from 'rxjs/Observable'; | |
import {of} from 'rxjs/observable/of'; | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
<ng-container *ngIf="data$ | async as data"> <!-- removed from dom --> | |
<div> | |
Data: {{data}} <!-- removed from dom --> | |
</div> |
This file contains hidden or 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 {Observable} from 'rxjs/Observable'; | |
import {of} from 'rxjs/observable/of'; | |
import {LetDirective} from './let.directive'; | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
<ng-container *ngLet="data$ | async as data"> <!-- single subscription --> | |
<div> |
This file contains hidden or 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 {Observable} from 'rxjs/Observable'; | |
import {defer} from 'rxjs/observable/defer'; | |
import {of} from 'rxjs/observable/of'; | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
<ng-container *ngIf="data$ | async as data"> <!-- single subscription --> | |
<div> | |
Data: {{data}} <!-- 0.4431839407652687 --> |
This file contains hidden or 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 {Observable} from 'rxjs/Observable'; | |
import {defer} from 'rxjs/observable/defer'; | |
import {of} from 'rxjs/observable/of'; | |
@Component({ | |
selector: 'my-app', | |
template: ` | |
<div> | |
Data: {{data$ | async}} <!-- 0.2762838374749106 --> | |
</div> |
This file contains hidden or 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 {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core'; | |
interface LetContext<T> { | |
ngLet: T; | |
} | |
@Directive({ | |
selector: '[ngLet]' | |
}) | |
export class LetDirective<T> { |
This file contains hidden or 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
// counter.reducer.ts | |
import { CounterActions, CounterTypes } from './counter.actions'; | |
export function reducer(state: number = 0, action: CounterActions): State { | |
switch(action.type) { | |
case CounterTypes.INCREMENT: { | |
return state + 1; | |
} | |
case CounterTypes.DECREMENT: { | |
return state - 1; |
This file contains hidden or 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
// counter.reducer.ts | |
import * as CounterActions from './counter.actions'; | |
export type Action = CounterActions.All; | |
export function reducer(state: number = 0, action: Action): State { | |
switch(action.type) { | |
case CounterActions.INCREMENT: { | |
return state + 1; | |
} |
This file contains hidden or 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
// counter.actions.ts | |
import { Action } from '@ngrx/store'; | |
export const INCREMENT = '[Counter] Increment'; | |
export const DECREMENT = '[Counter] Decrement'; | |
export const RESET = '[Counter] Reset'; | |
export class Increment implements Action { | |
readonly type = INCREMENT; | |
} |
NewerOlder