Skip to content

Commit

Permalink
chore(Example): Add login info to example app. Fix sidenav issue with IE
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Sep 28, 2017
1 parent 4b606d5 commit 416980e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
10 changes: 4 additions & 6 deletions example-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,18 @@ Built with [@angular/cli](https://github.com/angular/angular-cli)
# clone the repo
git clone https://github.com/ngrx/platform.git

# Use npm or yarn to install the dependencies:
npm install

# OR
# Install the dependencies:
yarn

# start the server
npm run build && npm run cli -- serve
yarn run build && yarn run cli -- serve

# OR
yarn run example:start
```

Navigate to [http://localhost:4200/](http://localhost:4200/) in your browser
Navigate to [http://localhost:4200/](http://localhost:4200/) in your browser. To login, the username and password is `test`.


_NOTE:_ The above setup instructions assume you have added local npm bin folders to your path.
If this is not the case you will need to install the Angular CLI globally.
4 changes: 2 additions & 2 deletions example-app/app/core/components/nav-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Component, Input, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'bc-nav-item',
template: `
<a md-list-item [routerLink]="routerLink" (click)="activate.emit()">
<a md-list-item [routerLink]="routerLink" (click)="navigate.emit()">
<md-icon md-list-icon>{{ icon }}</md-icon>
<span md-line><ng-content></ng-content></span>
<span md-line class="secondary">{{ hint }}</span>
Expand All @@ -21,5 +21,5 @@ export class NavItemComponent {
@Input() icon = '';
@Input() hint = '';
@Input() routerLink: string | any[] = '/';
@Output() activate = new EventEmitter();
@Output() navigate = new EventEmitter();
}
8 changes: 4 additions & 4 deletions example-app/app/core/containers/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ import * as Auth from '../../auth/actions/auth';
template: `
<bc-layout>
<bc-sidenav [open]="showSidenav$ | async">
<bc-nav-item (activate)="closeSidenav()" *ngIf="loggedIn$ | async" routerLink="/" icon="book" hint="View your book collection">
<bc-nav-item (navigate)="closeSidenav()" *ngIf="loggedIn$ | async" routerLink="/" icon="book" hint="View your book collection">
My Collection
</bc-nav-item>
<bc-nav-item (activate)="closeSidenav()" *ngIf="loggedIn$ | async" routerLink="/books/find" icon="search" hint="Find your next book!">
<bc-nav-item (navigate)="closeSidenav()" *ngIf="loggedIn$ | async" routerLink="/books/find" icon="search" hint="Find your next book!">
Browse Books
</bc-nav-item>
<bc-nav-item (activate)="closeSidenav()" *ngIf="!(loggedIn$ | async)">
<bc-nav-item (navigate)="closeSidenav()" *ngIf="!(loggedIn$ | async)">
Sign In
</bc-nav-item>
<bc-nav-item (activate)="logout()" *ngIf="loggedIn$ | async">
<bc-nav-item (navigate)="logout()" *ngIf="loggedIn$ | async">
Sign Out
</bc-nav-item>
</bc-sidenav>
Expand Down

0 comments on commit 416980e

Please sign in to comment.