Skip to content

Commit

Permalink
route to relics
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Smart <[email protected]>
  • Loading branch information
mcred committed Dec 3, 2016
1 parent 4644c0c commit e46dbf5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {FormsModule} from "@angular/forms";
import { AppComponent } from './components/app.component';
import { CharacterComponent } from './components/character.component';
import { InventoryComponent } from './components/inventory.component';
import { RelicsComponent } from './components/relics.component';
import { SelectFileComponent } from './components/selectfile.component';

import { FileService } from './services/file.service';
Expand All @@ -16,6 +17,7 @@ const routes: Routes = [
{ path: '', redirectTo: 'selectfile', pathMatch: 'full'},
{ path: 'character', component: CharacterComponent },
{ path: 'selectfile', component: SelectFileComponent },
{ path: 'relics', component: RelicsComponent },
{ path: 'inventory', component: InventoryComponent }
]

Expand All @@ -29,6 +31,7 @@ const routes: Routes = [
AppComponent,
CharacterComponent,
SelectFileComponent,
RelicsComponent,
InventoryComponent
],
providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}, FileService, SOTN],
Expand Down
4 changes: 4 additions & 0 deletions app/components/character.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ export class CharacterComponent {
this.router.navigate(['/inventory']);
}

goToRelics(){
this.router.navigate(['/relics']);
}

}
1 change: 1 addition & 0 deletions app/templates/character.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ <h3>ALUCARD</h3>
</form>
<div class="equipMenu">
<button (click)="goToInventory()">Equip</button>
<button (click)="goToRelics()">Relics</button>
</div>
</div>

0 comments on commit e46dbf5

Please sign in to comment.