Adding LoginFacebookComponent

It's time to switch to Angular. From Solution Explorer, right-click to the /ClientApp/app/components/login/ folder, add a new login.facebook.component.ts file, and fill it with the following content:

import { Component, Inject, OnInit, NgZone, PLATFORM_ID } from "@angular/core";import { isPlatformBrowser } from '@angular/common';import { HttpClient } from "@angular/common/http";import { Router } from "@angular/router";import { AuthService } from '../../services/auth.service';// declare these vars here // to let the TS compiler know that they existdeclare var window: any;declare var FB: any;@Component({    selector: "login-facebook",    templateUrl: "./login.facebook.component.html"})export class LoginFacebookComponent ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.