Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@
"winston": "^2.1.1"
},
"devDependencies": {
"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
"@angular/core": "2.0.0-rc.4",
"@angular/forms": "^0.2.0",
"@angular/http": "2.0.0-rc.4",
"@angular/platform-browser": "2.0.0-rc.4",
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "^0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"autoprefixer": "^6.3.3",
"autoprefixer-core": "^6.0.1",
"awesome-typescript-loader": "^1.0.0",
Expand Down Expand Up @@ -110,7 +110,7 @@
"raf": "^3.2.0",
"ramda": "^0.21.0",
"raw-loader": "^0.5.1",
"redux": "^3.4.0",
"redux": "^3.5.0",
"redux-localstorage": "^0.4.0",
"redux-logger": "^2.6.1",
"reflect-metadata": "0.1.3",
Expand Down
17 changes: 17 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
import { NgModule } from '@angular/core';
import { Lineup } from './lineup';
import { Panel } from './panel';
import { Table } from './table';
import { Menu } from './menu';
import { Orders } from './orders';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
export * from './lineup';
export * from './panel';
export * from './table';
export * from './menu';
export * from './orders';

@NgModule({
imports: [CommonModule, FormsModule],
declarations: [Lineup, Panel, Table, Menu, Orders],
exports: [Lineup, Panel, Table, Menu, Orders]
})
export class ComponentsModule {

}
4 changes: 1 addition & 3 deletions src/components/lineup/lineup.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import {
ChangeDetectionStrategy,
EventEmitter
} from '@angular/core';
import { REACTIVE_FORM_DIRECTIVES } from '@angular/forms';
import { ILineup } from '../../store';

const TEMPLATE = require('./lineup.component.html');
@Component({
selector: 'tb-lineup',
template: TEMPLATE,
changeDetection: ChangeDetectionStrategy.OnPush,
directives: [REACTIVE_FORM_DIRECTIVES]
changeDetection: ChangeDetectionStrategy.OnPush
})
export class Lineup {
@Input() lineup: ILineup;
Expand Down
3 changes: 1 addition & 2 deletions src/components/menu/menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ import {
ChangeDetectionStrategy,
EventEmitter
} from '@angular/core';
import { Panel } from '../';


@Component({
selector: 'tb-menu',
template: require('./menu.template.html'),
changeDetection: ChangeDetectionStrategy.OnPush,
directives: [ Menu ]
})
export class Menu {
@Input() menuItems: any;
Expand Down
6 changes: 3 additions & 3 deletions src/components/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import {
} from '@angular/core';
import { Observable } from 'rxjs';
import { IParty } from '../../store';
import { Panel } from '../';
import { REACTIVE_FORM_DIRECTIVES } from '@angular/forms';

const TEMPLATE = require('./table.template.html');

@Component({
selector: 'tb-table',
template: TEMPLATE,
directives: [Panel, REACTIVE_FORM_DIRECTIVES ]

})
export class Table {
@Input() table: any;
Expand Down
31 changes: 18 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,37 @@ import '../shims/shims_for_IE';
import 'zone.js/dist/zone';
import 'ts-helpers';

import { enableProdMode, provide } from '@angular/core';
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode, provide, NgModule } from '@angular/core';
import { BrowserModule, platformBrowser} from '@angular/platform-browser';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { APP_BASE_HREF } from '@angular/common/index';
import { provideForms } from '@angular/forms';
import { FormsModule} from '@angular/forms';
import { DevToolsExtension, NgRedux } from 'ng2-redux';

import { PartyService } from './services/party';
import { ACTION_PROVIDERS } from './actions';
import { HomePage } from './pages/home.page';
import { ComponentsModule } from './components';

declare const __PRODUCTION__: boolean;
declare const __TEST__: boolean;

@NgModule({
imports: [BrowserModule, FormsModule, ComponentsModule],
declarations: [HomePage],
bootstrap: [HomePage],
providers: [NgRedux,
DevToolsExtension,
ACTION_PROVIDERS,
PartyService, { provide: APP_BASE_HREF, useValue: '/' }]
})
class MyAppModule { }

if (__PRODUCTION__) {
enableProdMode();
} else {
require('zone.js/dist/long-stack-trace-zone');
}

if (!__TEST__) {
bootstrap(HomePage, [
provideForms(),
NgRedux,
DevToolsExtension,
ACTION_PROVIDERS,
PartyService,
provide(APP_BASE_HREF, { useValue: '/' })
]);
}
platformBrowserDynamic().bootstrapModule(MyAppModule)
}
3 changes: 0 additions & 3 deletions src/pages/home.page.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { Lineup, Panel, Table, Menu } from '../components';
import { DevToolsExtension, NgRedux, select } from 'ng2-redux';
import {
IAppState,
Expand All @@ -10,15 +9,13 @@ import {
} from '../store';
import { Observable } from 'rxjs';
import { LineupActions, TableActions } from '../actions';
import { Orders } from '../components';
import { placedOrders } from '../selectors/selectors';
import { reimmutify } from '../store';

const TEMPLATE = require('./home.template.html');
@Component({
selector: 'tb-home',
template: TEMPLATE,
directives: [ Lineup, Panel, Table, Menu, Orders ],
encapsulation: ViewEncapsulation.None,
styles: [ require('../styles/index.css') ],
})
Expand Down