Skip to content

Instantly share code, notes, and snippets.

@reed-lawrence
Last active December 3, 2019 19:46
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 reed-lawrence/708f95c58f82b995cf99545ca46a629c to your computer and use it in GitHub Desktop.
Save reed-lawrence/708f95c58f82b995cf99545ca46a629c to your computer and use it in GitHub Desktop.
Cross-component change detection observables
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