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
import { NgModule } from "@angular/core"; | |
import { Routes, RouterModule } from "@angular/router"; | |
import { JobsComponent } from "./jobs/jobs.component"; | |
import { HomeComponent } from "./home/home.component"; | |
import { CompaniesComponent } from "./companies/companies.component"; | |
import { MessagesComponent } from "./messages/messages.component"; | |
import { LoginGuard } from "./login/login.guard"; | |
const routes: Routes = [ | |
{ path: "", component: HomeComponent }, |
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
import { BrowserModule } from "@angular/platform-browser"; | |
import { NgModule } from "@angular/core"; | |
import { HttpClientModule } from "@angular/common/http"; | |
import { AppRoutingModule } from "./app-routing.module"; | |
import { AppComponent } from "./app.component"; | |
import { NavComponent } from "./nav/nav.component"; | |
import { HomeComponent } from "./home/home.component"; | |
import { RegisterComponent } from "./register/register.component"; | |
import { JobsComponent } from "./jobs/jobs.component"; |
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
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router} from "@angular/router"; | |
import { Injectable } from "@angular/core"; | |
import { AuthService } from "../_services/auth.service"; | |
import { AlertifyService } from '../_services/alertify.service'; | |
@Injectable() | |
export class LoginGuard implements CanActivate { | |
constructor(private authservice: AuthService, private router: Router, private alertify:AlertifyService) {} | |
canActivate( |
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
import { Injectable } from "@angular/core"; | |
import { HttpClient } from "@angular/common/http"; | |
import { map } from "rxjs/operators"; | |
import { environment } from 'src/environments/environment.prod'; | |
@Injectable({ | |
providedIn: "root" | |
}) | |
export class AuthService { | |
constructor(private httpClient: HttpClient) { } |
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
import { Component, OnInit } from "@angular/core"; | |
import { JobService } from "../_services/Job.service"; | |
import { Job } from "src/models/Job"; | |
import { AlertifyService } from "../_services/alertify.service"; | |
@Component({ | |
selector: "app-jobs", | |
templateUrl: "./jobs.component.html", | |
styleUrls: ["./jobs.component.css"], | |
providers: [JobService] |
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
<div class="row"> | |
<div class="col-6 col-sm-6 col-lg-6"> | |
<h3 class="text-muted">{{ listTitle }}</h3> | |
<br /> | |
<ul class="list-group" *ngFor="let job of jobs"> | |
<div class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" > | |
<div class="flex-column"> | |
<b><p style="font-size: 20px;margin-bottom: -1px"> | |
{{ job.title }} | |
</p></b> |
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
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; | |
... | |
imports: [ | |
... | |
ReactiveFormsModule | |
], | |
... |
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
import { Component, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-register', | |
templateUrl: './register.component.html', | |
styleUrls: ['./register.component.css'] | |
}) | |
export class RegisterComponent implements OnInit { | |
constructor() { } |
NewerOlder