Theme styles added and useless files rm

This commit is contained in:
smartapant 2016-04-22 13:15:25 +03:00
parent 27dcebeba2
commit f87b6ce425
28 changed files with 1210 additions and 231 deletions

View file

@ -1,39 +0,0 @@
import {Injectable} from 'angular2/core';
import {HmrState} from 'angular2-hmr';
@Injectable()
export class AppState {
// HmrState uis used by HMR to track the any state during reloading
@HmrState() _state = {};
constructor() {
}
// already return a clone of the current state
get state() {
return this._state = this._clone(this._state);
}
// never allow mutation
set state(value) {
throw new Error('do not mutate the `.state` directly');
}
get(prop?: any) {
// use our state getter for the clone
const state = this.state;
return state[prop] || state;
}
set(prop: string, value: any) {
// internally mutate our state
return this._state[prop] = value;
}
_clone(object) {
// simple object clone
return JSON.parse(JSON.stringify( object ));
}
}