Skip to content

Commit

Permalink
Merge pull request #111 from chriscurnow/master
Browse files Browse the repository at this point in the history
Refactor to fix broken links in large-app
  • Loading branch information
PatrickJS committed Oct 26, 2015
2 parents 8d023f6 + 8caf8e9 commit 9e2cbf6
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 30 deletions.
23 changes: 12 additions & 11 deletions examples/large-app/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@ import {bootstrap} from 'angular2/angular2';
* Common Injectables
* our custom helper injectables to configure our app differently using the dependency injection system
*/
import {
JIT_CHANGEDETECTION_BINDINGS,
DYNAMIC_CHANGEDETECTION_BINDINGS,
PREGENERATED_CHANGEDETECTION_BINDINGS,
BEST_CHANGEDETECTION_BINDINGS
} from '../common/change_detection_bindings';
import {
HTML5_LOCATION_BINDINGS,
HASH_LOCATION_BINDINGS
} from '../common/location_bindings';
// import {
// JIT_CHANGEDETECTION_BINDINGS,
// DYNAMIC_CHANGEDETECTION_BINDINGS,
// PREGENERATED_CHANGEDETECTION_BINDINGS,
// BEST_CHANGEDETECTION_BINDINGS
// } from '../common/change_detection_bindings';
// import {
// HTML5_LOCATION_BINDINGS,
// HASH_LOCATION_BINDINGS
// } from '../common/location_bindings';

/*
* Angular Modules
*/
import {HTTP_BINDINGS, FORM_BINDINGS} from 'angular2/angular2';
import {HTTP_BINDINGS, } from 'angular2/http';
import {FORM_BINDINGS} from 'angular2/src/core/forms'
import {ROUTER_BINDINGS} from 'angular2/router';

/*
Expand Down
4 changes: 2 additions & 2 deletions examples/large-app/components/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ import {APP_PIPES} from '../pipes/pipes';
* Components
*/
// We use a folder if we want separate files
import {Home} from './home/home';
import {Home} from '../../simple-component/home/home';
// Otherwise we only use one file for a component
import {Dashboard} from './dashboard';
// A simple example of a Component using a Service
import {Todo} from './todo';
import {Todo} from '../../simple-todo/components/todo';

// RxJs examples
import {RxJsExamples} from './rxjs_examples/rxjs-examples';
Expand Down
23 changes: 12 additions & 11 deletions examples/large-app/components/rxjs_examples/rxjs-examples.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
/// <reference path="../../../typings/_custom.d.ts" />

// Angular 2
import {Component, View, CSSClass} from 'angular2/angular2';
import {Component, View} from 'angular2/angular2';
import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';

import {Search} from './autosuggest/search';
import {Timeflies} from './timeflies/timeflies';
import {Tictactoe} from './tictactoe/tictactoe';
import {DraggableDiv} from './draggable_div/draggable_div';
import {SearchGithub} from '../../../rx-autosuggest/components/search-github';
//import {Timeflies} from './timeflies/timeflies';
//import {Tictactoe} from './tictactoe/tictactoe';
//import {DraggableDiv} from './draggable_div/draggable_div';



@Component({
selector: 'rxjs-examples'
})
@RouteConfig([
{ path: '/', redirectTo: '/search' },
{ path: '/search', as: 'search', component: Search },
{ path: '/timeflies', as: 'timeflies', component: Timeflies },
{ path: '/tictactoe', as: 'tictactoe', component: Tictactoe },
{ path: '/draggable_div', as: 'draggable_div', component: DraggableDiv }
{ path: '/', redirectTo: '/search' }//,
//{ path: '/search', as: 'search', component: Search },
//{ path: '/timeflies', as: 'timeflies', component: Timeflies },
//{ path: '/tictactoe', as: 'tictactoe', component: Tictactoe },
//{ path: '/draggable_div', as: 'draggable_div', component: DraggableDiv }
])
@View({
directives: [ ROUTER_DIRECTIVES, CSSClass ],
//directives: [ ROUTER_DIRECTIVES, CSSClass ],
// include our .css file
styles: [
// Use webpack's `require` to get files as a raw string using raw-loader
Expand Down
4 changes: 2 additions & 2 deletions examples/large-app/pipes/RxPipe.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// <reference path="../../typings/_custom.d.ts" />
import {Pipe, ChangeDetectorRef} from 'angular2/angular2';
import {AsyncPipe} from "angular2/pipes";
import * as Rx from 'rx';
import {AsyncPipe} from "angular2/angular2";
import * as Rx from '@reactivex/rxjs';

export function isObservable(obs) {
return obs && typeof obs.subscribe === 'function';
Expand Down
2 changes: 1 addition & 1 deletion examples/large-app/pipes/pipes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* Angular 2
*/
import {Pipes} from 'angular2/change_detection';
import {Pipe} from 'angular2/angular2';

/*
* App Pipes
Expand Down
2 changes: 1 addition & 1 deletion examples/large-app/services/example-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import {Injectable} from 'angular2/angular2';
import {Http} from 'angular2/http';
import * as Rx from 'rx';
import * as Rx from '@reactivex/rxjs';


@Injectable()
Expand Down
4 changes: 2 additions & 2 deletions examples/large-app/services/services.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// <reference path="../../typings/_custom.d.ts" />

import {bind} from 'angular2/angular2';
import {EXAMPLE_SERVICE_BINDINGS} from 'example-service';
import {EXAMPLE_SERVICE_BINDINGS} from './example-service';


export * from 'example-service';
export * from './example-service';
// Include bindings that you want to have globally throughout our app
export var APP_SERVICES_BINDINGS: Array<any> = [
EXAMPLE_SERVICE_BINDINGS
Expand Down
3 changes: 3 additions & 0 deletions examples/rx-autosuggest/directives/ac-autosuggest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
// Angular 2
import {Directive, View, EventEmitter, ElementRef} from 'angular2/angular2';



// RxJs
import * as Rx from '@reactivex/rxjs';

import {GithubService} from '../services/GithubService';


declare var zone: Zone;

@Directive({
Expand Down

0 comments on commit 9e2cbf6

Please sign in to comment.