Shared Flashcard Set

Details

Angular
ng studyService
13
Computer Science
Professional
01/06/2019

Additional Computer Science Flashcards

 


 

Cards

Term
useHash: true
Definition

localhost: 4200/#/users instead of localhost:4200/users.

Not optimal for most cases. Used only to prevent server from parsing the local path relative to itself and causing 404s. 

Term
resolve: {server: ServerResolver}
Definition
this path should preload some data and only then render the component
Term
Resolve<>
Definition
a guard interface that fetches data before rendering a component
Term
this.route.data.subscribe((data: Data) => {})
Definition
receive the Data property of the path
Term
data: {key: 'value'}
Definition
this path should pass the indicated object
Term
canDeactivate: [CanDeactivateGuard]
Definition
this path should run a guard to determine whether to allow it when the user tries to leave a component
Term
CanDeactivate<>
Definition
guard interface that determines whether to allow the user to leave a component
Term
this.router.navigate(['../'], {relativeTo: this.route})
Definition
go up one level to the parent path
Term
CanActivate<>
Definition
guard interface to determine whether to allow loading a component
Term
CanActivateChild<>
Definition
guard interface to determine whether to allow children of a component to load
Term
this.router.navigate(['/'])
Definition
reload the same component
Term
redirectTo: '/path'
Definition
this path should load the indicated path instead
Term
this.route.queryParams.subscribe((queryParams: Params) => {})
Definition
receive query params when they change
Supporting users have an ad free experience!