Last active
December 3, 2019 19:46
-
-
Save reed-lawrence/708f95c58f82b995cf99545ca46a629c to your computer and use it in GitHub Desktop.
Cross-component change detection observables
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
export interface IUser { | |
username: string; | |
email: string; | |
} | |
export class User implements IUser { | |
email: string = ''; | |
username: string = ''; | |
constructor(init?: Partial<IUser>) { | |
if (init) { | |
if (init.email) { this.email = init.email; } | |
if (init.username) { this.username = init.username; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment