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
// <![CDATA[ | |
var langCodes = { | |
"af": "Afrikaans", | |
"sq": "Albanian", | |
"an": "Aragonese", | |
"ar": "Arabic (Standard)", | |
"ar-dz": "Arabic (Algeria)", | |
"ar-bh": "Arabic (Bahrain)", | |
"ar-eg": "Arabic (Egypt)", | |
"ar-iq": "Arabic (Iraq)", |
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
.mat-toolbar { | |
font-size: 12px; | |
color: rgba(0,0,0,.54); | |
} | |
button { | |
border: none !important; | |
background-color: transparent; | |
} | |
@media(max-width: 576px) { |
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
<mat-toolbar *ngIf=" length > 0"> | |
<span style="margin-left: 20%" class="responsive-view"> {{ 1 + (pageOffset * (pageIndex - 1)) }} | |
- {{ (pageOffset * pageIndex) <= length ? pageOffset * pageIndex : length }} | |
of {{ length }}</span> | |
<span style="margin-left: 20%" class="responsive-view margin-for-mobile"> | |
<button [disabled]="pageIndex <= 1" (click)="getFirstPage()"> | |
<i class="material-icons">first_page</i> | |
</button> | |
<button [disabled]="pageIndex <= 1" (click)="getPreviousPage()"> | |
<i class="material-icons">chevron_left</i> |
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 {AfterViewInit, Component, Input, OnInit} from '@angular/core'; | |
import {BehaviorSubject} from 'rxjs'; | |
interface State { | |
page: number; | |
pageOffset: number; | |
} | |
@Component({ | |
selector: 'basic-pagination', |
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 { NgModule } from '@angular/core'; | |
import { CommonModule } from '@angular/common'; | |
import { FlexLayoutModule } from '@angular/flex-layout'; | |
import { BasicPaginationComponent } from './basic-pagination.component'; | |
import {MatToolbarModule} from '@angular/material'; | |
@NgModule({ | |
declarations: [ | |
BasicPaginationComponent, | |
], |
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 {CommonModule} from '@angular/common'; | |
import {NgModule} from '@angular/core'; | |
import {DataService} from '../../shared/services/data.service'; | |
import {FileUploadService} from './services/file-upload.service'; | |
import {FlexModule} from '@angular/flex-layout'; | |
import {RouterModule} from "@angular/router"; | |
import { | |
MatFormFieldModule, MatIconModule, MatInputModule, MatSnackBarModule, |
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 {FormBuilder, FormGroup, Validators} from '@angular/forms'; | |
import {Subject} from 'rxjs'; | |
import {takeUntil} from 'rxjs/operators'; | |
// your extra code if you needed… | |
export class FileUploadComponent implements OnInit, OnDestroy { | |
formGroup: FormGroup; | |
disabled = true; |
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
<form class="form-group" [formGroup]="formGroup"> | |
<div mat-dialog-content> | |
<!-- Name --> | |
<mat-form-field> | |
<input matInput formControlName="first_name" placeholder="Name…" > | |
<mat-error *ngIf="!formGroup.controls.first_name.invalid"> | |
Filed is required... | |
</mat-error> | |
</mat-form-field> |
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
#include<cstdio> | |
#include<sstream> | |
#include<cstdlib> | |
#include<cmath> | |
#include<algorithm> | |
#include<iostream> | |
#include<string> | |
#include<vector> | |
#include<cstring> | |
#include<map> |
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
#include<cstdio> | |
#include<sstream> | |
#include<cstdlib> | |
#include<cmath> | |
#include<algorithm> | |
#include<iostream> | |
#include<string> | |
#include<vector> | |
#include<cstring> | |
#include<map> |