July 2018
Intermediate to advanced
336 pages
9h 23m
English
To generate the User Profile page, we use the following code:
ng g c user-profile
This will generate the user-profile.component.css, user-profile.component.html, user-profile.component.spec.ts, and user-profile.component.ts files under the /src/app/user-profile directory.
user-profile.component.ts will look like the following after modifying the stub code:
import { Component, OnDestroy, OnInit } from '@angular/core';import { Subscription } from 'rxjs/Subscription';import { ActivatedRoute, Router } from '@angular/router';import { AuthService } from '../auth.service';import { UsersService } from '../shared/users/users.service';import { NgForm } from '@angular/forms';@Component({ selector: 'app-user-profile', ...Read now
Unlock full access