Skip to content

Instantly share code, notes, and snippets.

app
_app.scss
modules
dashboard
_dashboard.scss
_app.scss
@import "../assets/scss/variables";
articles
forms
articles-form.module.ts
components
container
articles.module.ts
{ path: 'auth', component: LayoutsDefaultMainComponent,
children: [
{ path: 'login', component: AuthenticationLoginComponent, data: { state: 'login' }},
{ path: 'logout', component: AuthenticationLogoutComponent, data: { state: 'logout' } },
]
},
{ path: 'account', component: LayoutsDefaultMainComponent,
children: [
{ path: 'whoareyou', component: AccountWhoareyouComponent},
{ path: 'profile', component: AccountProfileComponent},
import { Component,TemplateRef, AfterContentInit, OnInit, ViewChild,ViewContainerRef, ComponentFactoryResolver, ComponentRef } from '@angular/core';
import { AuthFormComponent } from './auth-form/auth-form.component';
import { User } from './auth-form/auth-form.interface';
@Component({
selector: 'todd-root',
template: `
<div class="auth">
<button (click)="destroyComponent()">destroy</button>
import { Component,TemplateRef, AfterContentInit, OnInit, ViewChild,ViewContainerRef, ComponentFactoryResolver, ComponentRef } from '@angular/core';
import { AuthFormComponent } from './auth-form/auth-form.component';
import { User } from './auth-form/auth-form.interface';
@Component({
selector: 'todd-root',
template: `
<div class="auth">
<button (click)="destroyComponent()">destroy</button>
/** GRID **/
const dynamicDataGrid = [{
processId: "67543",
processType: "CHECK_IN",
dueDate: "2018-06-13",
dueTime: "00:00",
apartment: null,
guestName: "[1193] TEST Test",
contacts: null,
guestsNumber: 1,
{
"id" : null,
"lang" : "it",
"processId" : "55075",
"taskId" : "55096",
"actionId" : "execute_task",
"title" : "Collect check-in data",
"description" : "<strong>activiti.form.check_in.booking_info</strong><ul><li><strong>activiti.form.check_in.booking_status</strong>: BookingState{id=3, name='CANCELLED'}</li><li><strong>activiti.form.check_in.booking_id</strong>: Beesprint Srl_180122_wNuB3mNfLO</li><li><strong>activiti.form.check_in.check_in</strong>: 2018-06-07 11:58</li><li><strong>activiti.form.check_in.guests</strong>:<br /><ul>)<li><strong>[588] Garcia Alvarez Natalia</strong> (E-mail: [email protected] Phone: +34695149354 </li><li><strong>[589] Garcia Alvarez Natalia</strong></li></ul></li><li><strong>activiti.form.check_in.booking_notes</strong>: ** THIS RESERVATION HAS BEEN PRE-PAID **Guest has paid: EUR 448.00 - BankTransfer - Tassa di soggiorno 105.00 EUR not included for Room 1 - GUEST COUNT from search: 6 adult - Not all taxes are included in the reservation total
private _onDestroy = new Subject();
ngOnInit() {
myservice
.pipe(takeUntil(this._onDestroy))
.subscribe(data => this.data = data);
}
ngOnDestroy() {
{
"id" : null,
"general" : {
"firstname" : "",
"lastname" : "",
"companyName" : "",
"address" : "",
"ssn" : "",
"vat" : "",
"legalStatus" : "LEGAL",
type User = {
id: number;
name: string;
}
type LoadUsersResponse = {
users:User[];
}