Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ZackDeRose/8c360679736927449b895fe44cdf1704 to your computer and use it in GitHub Desktop.
Save ZackDeRose/8c360679736927449b895fe44cdf1704 to your computer and use it in GitHub Desktop.
Snippet for heroes BehaviorSubject initialization for "Angular CDK Tables" article
heroes$ = new BehaviorSubject<{[name: string]: any}>({
'Hammerer Maccabeus': {
name: 'Hammerer Maccabeus',
types: 'Holy/Fire',
attack: 1,
defense: 1,
speed: 1,
healing: 1,
recovery: 1,
health: 5
},
'Ethereal Moodmorph': {
name: 'Ethereal Moodmorph',
types: 'Water/Fire',
attack: 1,
defense: 1,
speed: 1,
healing: 1,
recovery: 1,
health: 5
}
});
tableDataSource$ = new BehaviorSubject<any[]>([]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment