This file contains hidden or 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 {Router} from "@angular/router"; | |
| import {AuthService} from "../services/auth.service"; | |
| import {Angular2TokenService} from "angular2-token"; | |
| @Component({ | |
| selector: 'app-profile', | |
| templateUrl: './profile.component.html', | |
| styleUrls: ['./profile.component.sass'] |
This file contains hidden or 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, Output, EventEmitter} from '@angular/core'; | |
| import {AuthService} from "../services/auth.service"; | |
| @Component({ | |
| selector: 'app-login-form', | |
| templateUrl: './login-form.component.html', | |
| styleUrls: ['./login-form.component.sass'] | |
| }) | |
| export class LoginFormComponent implements OnInit { |
This file contains hidden or 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
| <!--Navigation--> | |
| <div class="navbar-fixed"> | |
| <nav role="navigation"> | |
| <div class="nav-wrapper blue "> | |
| <a [routerLink]="['']" id="logo-container" class="brand-logo">Rails & Angular Auth</a> | |
| <ul class="right hide-on-med-and-down"> |
This file contains hidden or 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, ViewChild} from '@angular/core'; | |
| import {AuthDialogComponent} from "../auth-dialog/auth-dialog.component"; | |
| import {AuthService} from "../services/auth.service"; | |
| import {Router} from "@angular/router"; | |
| @Component({ | |
| selector: 'app-toolbar', | |
| templateUrl: './toolbar.component.html', | |
| styleUrls: ['./toolbar.component.sass'] | |
| }) |
This file contains hidden or 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 {Angular2TokenService} from "angular2-token"; | |
| import {Subject, Observable} from "rxjs"; | |
| import {Response} from "@angular/http"; | |
| @Injectable() | |
| export class AuthService { | |
| userSignedIn$:Subject<boolean> = new Subject(); |
This file contains hidden or 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="navbar-fixed"> | |
| <nav role="navigation"> | |
| <div class="nav-wrapper blue "> | |
| <a [routerLink]="['']" id="logo-container" class="brand-logo">Rails & Angular Auth</a> | |
| <ul class="right hide-on-med-and-down"> | |
| <li> <a (click)="presentAuthDialog()" >LOGIN</a></li> |
This file contains hidden or 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
| <!--Navigation--> | |
| <div class="navbar-fixed"> | |
| <nav role="navigation"> | |
| <div class="nav-wrapper blue "> | |
| <a [routerLink]="['']" id="logo-container" class="brand-logo">Rails & Angular Auth</a> | |
| <ul class="right hide-on-med-and-down"> |
This file contains hidden or 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, ViewChild} from '@angular/core'; | |
| import {AuthDialogComponent} from "../auth-dialog/auth-dialog.component"; | |
| import {Angular2TokenService} from "angular2-token"; | |
| @Component({ | |
| selector: 'app-toolbar', | |
| templateUrl: './toolbar.component.html', | |
| styleUrls: ['./toolbar.component.sass'] | |
| }) | |
| export class ToolbarComponent implements OnInit { |
This file contains hidden or 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="modal" materialize="modal" [materializeActions]="modalActions"> | |
| <div class="modal-content"> | |
| <div class="row"> | |
| <div class="row"> |
This file contains hidden or 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, Input, EventEmitter} from '@angular/core'; | |
| import {MaterializeAction} from "angular2-materialize"; | |
| @Component({ | |
| selector: 'app-auth-dialog', | |
| templateUrl: './auth-dialog.component.html', | |
| styleUrls: ['./auth-dialog.component.sass'] | |
| }) | |
| export class AuthDialogComponent implements OnInit { |