Created
October 22, 2020 06:19
-
-
Save IAfanasov/62e2705b291b5f82f2a9cebb8ac300aa to your computer and use it in GitHub Desktop.
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
@Component({ | |
selector: 'app-dummy-component', | |
templateUrl: './dummy-component.component.html', | |
}) | |
export class DummyComponent implements OnInit { | |
constructor(public route: ActivatedRoute) { | |
} | |
ngOnInit(): void { | |
if (this.route.snapshot.queryParams[QueryParamNames.id]) { | |
// load the item and show the edit form | |
} else { | |
// load the creation form | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment