Run ng e2e to execute the end-to-end tests via Protractor.
π» Code Examples
data.service.ts function to get API data using GraphQL & Apollo
getCharactersByPage(pageNum: number): void{constQUERY_BY_PAGE=gql`{ characters(page: ${pageNum}) { results { id name status species gender image } } }`;this.apollo.watchQuery<any>({query: QUERY_BY_PAGE}).valueChanges.pipe(take(1),pluck('data','characters'),withLatestFrom(this.characters$),tap(([apiResponse,characters])=>{this.parseCharactersData([...characters, ...apiResponse.results]);})).subscribe();}
π Features - Frontend
Angular Universal used to generate static pages using Server Side Rendering (SSR) - to increase display speed and add Search Engine Optimisation (SEO). A normal Angular application executes in the browser, rendering pages in the DOM in response to user actions. Angular Universal executes on the server, generating static application pages that later get bootstrapped on the client. This means that the application generally renders more quickly, giving users a chance to view the application layout before it becomes fully interactive.