ng g guard guards/auth
-> select "canActivate"
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from '@angular/router';
import { NgModule } from '@angular/core'; | |
// import { MatAutocompleteModule } from '@angular/material/autocomplete'; | |
// import { MatBadgeModule } from '@angular/material/badge'; | |
import { MatButtonModule } from '@angular/material/button'; | |
// import { MatButtonToggleModule } from '@angular/material/button-toggle'; | |
// import { MatCardModule } from '@angular/material/card'; | |
// import { MatCheckboxModule } from '@angular/material/checkbox'; |
<?php
function json_response($code = 200, $message = null)
{
// clear the old headers
header_remove();
// set the actual code
http_response_code($code);
// set the header to make sure cache is forced
$theme-1: ( | |
container: ( | |
bg: #e4ada7, | |
color: #000, | |
border-color: #000 | |
), | |
left: ( | |
bg: #d88880, | |
color: #fff, | |
height: 100%, |
class Modal extends HTMLElement {
constructor() {
super();
this._modalVisible = false;
this._modal;
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
aws configure
eu-west-1
// Assume we have the following data in the Database:
{
"name": {
"first": "Ada",
"last": "Lovelace"
}
}
$ npm install --save lodash
# This is the new bit here:
$ npm install --save-dev @types/lodash