Skip to content

Instantly share code, notes, and snippets.

{
"directory": "app/bower_components"
}
@zinderud
zinderud / Angular_.bowerrc
Created February 26, 2015 13:56
angular denemeler
{
"directory": "app/bower_components"
}
@zinderud
zinderud / authentication.ts
Created December 29, 2017 11:32 — forked from btroncone/authentication.ts
Angular 2 application role access decorator, wrapping built in CanAccess functionality. Prevents view transitions when user roles are not appropriate.
import { Injectable } from 'angular2/core';
import { Storage } from './storage';
import { CurrentUser } from '../interfaces/common';
@Injectable()
export class Authentication{
private _storageService : Storage;
private _userKey : string = "CURRENT_USER";
constructor(storageService : Storage){
/* 3rd party libraries */
import { NgModule, Optional, SkipSelf } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
/* our own custom services */
import { SomeSingletonService } from './some-singleton/some-singleton.service';
@NgModule({
imports: [
@zinderud
zinderud / git-auto-deploy.md
Created January 27, 2018 16:47 — forked from yosukehasumi/git-auto-deploy.md
Setting Up Git-Auto-Deploy on Digital Ocean

Install software-properties-common

sudo apt-get install software-properties-common

Add Repo

sudo add-apt-repository ppa:olipo186/git-auto-deploy
import { Injectable } from "@angular/core";
import { Observable, Subject } from "rxjs/Rx";
import { filter, map } from "rxjs/operators";
export interface IClassConstructor<T> {
new (...args: any[]): T;
}
export interface IMessage {
channel: Function;
export class UserNotificationMessage {
constructor(
public message: string,
public notificationType?: NotificationType,
public options?: any,
public notifier?: any
) {}
}
export type NotificationType =
| "success"