Created
July 16, 2018 23:57
-
-
Save ZackDeRose/8c360679736927449b895fe44cdf1704 to your computer and use it in GitHub Desktop.
Snippet for heroes BehaviorSubject initialization for "Angular CDK Tables" article
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
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