Skip to content

Commit

Permalink
chore(Example): Add login info to example app. Fix sidenav issue with…
Browse files Browse the repository at this point in the history
… IE (#436)
  • Loading branch information
brandonroberts authored and MikeRyanDev committed Sep 28, 2017
1 parent 4b606d5 commit e63720e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 16 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
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"release": "lerna publish --skip-npm --conventional-commits && npm run build"
},
"engines": {
"node": ">=6.9.5",
"npm": ">=4.0.0",
"yarn": ">=0.27.5 <2.0.0"
},
"lint-staged": {
"*.ts": [
"yarn prettier",
Expand Down Expand Up @@ -100,7 +105,7 @@
"lerna": "^2.0.0",
"lint-staged": "^4.0.3",
"module-alias": "^2.0.0",
"ngrx-store-freeze": "^0.1.9",
"ngrx-store-freeze": "^0.2.0",
"nyc": "^10.1.2",
"ora": "^1.2.0",
"prettier": "^1.5.2",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4753,9 +4753,9 @@ nested-error-stacks@^1.0.0, nested-error-stacks@^1.0.1:
dependencies:
inherits "~2.0.1"

ngrx-store-freeze@^0.1.9:
version "0.1.9"
resolved "https://registry.yarnpkg.com/ngrx-store-freeze/-/ngrx-store-freeze-0.1.9.tgz#b20f18f21fd5efc4e1b1e05f6f279674d0f70c81"
ngrx-store-freeze@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/ngrx-store-freeze/-/ngrx-store-freeze-0.2.0.tgz#74c231947bbe1938af722f6a72624dc69788d39f"
dependencies:
deep-freeze-strict "^1.1.1"

Expand Down

0 comments on commit e63720e

Please sign in to comment.