Skip to content

Instantly share code, notes, and snippets.

Zlati Pehlivanov talamaska

  • Bulgaria
Block or report user

Report or block talamaska

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View npm-install-from-repo.bat
# Get the latest from GitHub, public repo:
$ npm install username/my-new-project --save-dev
# GitHub, private repo:
$ npm install git+https://token:x-oauth-basic@github.com/username/my-new-project.git#master
$ npm install git+ssh://git@github.com/username/my-new-project.git#master
# … or from Bitbucket, public repo:
$ npm install git+ssh://git@bitbucket.org/username/my-new-project.git#master --save-dev
# Bitbucket, private repo:
$ npm install git+https://username:password@bitbucket.org/username/my-new-project.git#master
@talamaska
talamaska / any.component.html
Created May 29, 2019 — forked from arniebradfo/any.component.html
Angular *ngFor recursive list tree template
View any.component.html
<h1>Angular 2 Recursive List</h1>
<ul>
<ng-template #recursiveList let-list>
<li *ngFor="let item of list">
{{item.title}}
<ul *ngIf="item.children.length > 0">
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: item.children }"></ng-container>
</ul>
</li>
</ng-template>
View ngx-data-table.component.ts
import { Component, OnInit, ViewChild, Input } from '@angular/core';
import { MatPaginator, MatSort } from '@angular/material';
import { NgxDataTableDataSource } from './ngx-data-table-datasource';
@Component({
selector: 'ngx-data-table',
templateUrl: './ngx-data-table.component.html',
styleUrls: ['./ngx-data-table.component.css']
})
export class NgxDataTableComponent {
View ngx-data-table-datasource.ts
import { DataSource } from '@angular/cdk/collections';
import { MatPaginator, MatSort } from '@angular/material';
import { map } from 'rxjs/operators';
import { Observable, of as observableOf, merge } from 'rxjs';
/**
* Data source for the NgxDataTable view. This class should
* encapsulate all logic for fetching and manipulating the displayed data
* (including sorting, pagination, and filtering).
View chips.dart
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// See: https://twitter.com/shakil807/status/1042127387515858949
// https://github.com/pchmn/MaterialChipsInput/tree/master/library/src/main/java/com/pchmn/materialchips
// https://github.com/BelooS/ChipsLayoutManager
void main() => runApp(ChipsDemoApp());
@talamaska
talamaska / Dart Class.dart
Created Jan 11, 2019 — forked from buntagonalprism/Dart Class.dart
Flutter and Dart collection of file templates for Android Studio development
View Dart Class.dart
#set( $nameparts = $NAME.split("_"))
#set( $namepart = '')
#set( $classname = '')
#foreach( $namepart in $nameparts )
#set( $classname = $classname + $namepart.substring(0, 1).toUpperCase() + $namepart.substring(1))
#end
class $classname {
// TODO: add class properties and methods
View custom.overlay.config.ts
interface CustomOverlayConfig {
hasBackdropClick?: boolean;
isCentered?: boolean;
size?: any;
top?: string;
}
const DEFAULT_CUSTOM_CONFIG: CustomOverlayConfig = {
hasBackdropClick: false,
isCentered: true,
View confirmation.modal.ref.ts
import { OverlayRef } from '@angular/cdk/overlay';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Subject } from 'rxjs/Subject';
export class ConfirmationModalOverlayRef {
public events = new BehaviorSubject<any>(null);
constructor(private overlayRef: OverlayRef) { }
public close(): void {
this.overlayRef.dispose();
}
@talamaska
talamaska / form.modal.component.ts
Last active Mar 20, 2019
component portal modals
View form.modal.component.ts
this.isSuccessSub = this.isSuccess$.subscribe((isSuccess) => {
if (isSuccess) {
this.dialogRef.close();
}
});
@talamaska
talamaska / loading-spinner.service.ts
Created May 15, 2018 — forked from caroso1222/loading-spinner.service.ts
Angular CDK - Portal and PortalHost
View loading-spinner.service.ts
import {
Injectable,
ComponentFactoryResolver,
ApplicationRef,
Injector
} from '@angular/core';
import {
ComponentType,
Portal,
ComponentPortal,
You can’t perform that action at this time.