Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Move navi start from AppComponent to NavComponent and modify things around it so that it actually works.
- Loading branch information
Showing
8 changed files
with
60 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { LogoComponent } from './logo/logo.component'; | ||
import { NavComponent } from './nav/nav.component'; | ||
import { ClarityModule } from '@clr/angular'; | ||
import { RouterModule } from '@angular/router'; | ||
import { BrowserModule } from '@angular/platform-browser'; | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | ||
|
||
|
||
import { ClarityModule } from '@clr/angular'; | ||
import { NavComponent } from './nav/nav.component'; | ||
import { LogoComponent } from './logo/logo.component'; | ||
import { SecurityModule } from '../security/security.module'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
LogoComponent, | ||
NavComponent | ||
], | ||
imports: [ | ||
RouterModule, | ||
BrowserModule, | ||
BrowserAnimationsModule, | ||
CommonModule, | ||
ClarityModule | ||
ClarityModule, | ||
SecurityModule | ||
], | ||
exports: [ | ||
LogoComponent, | ||
NavComponent | ||
NavComponent, | ||
] | ||
}) | ||
export class LayoutModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Needed for left navi bar to span all the way down | ||
:host { | ||
display: flex; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { SecurityService } from '../../security/service/security.service'; | ||
import { environment } from '../../../environments/environment'; | ||
|
||
@Component({ | ||
selector: 'app-nav', | ||
templateUrl: './nav.component.html', | ||
styles: [] | ||
styleUrls: ['./nav.component.scss'] | ||
}) | ||
export class NavComponent implements OnInit { | ||
|
||
constructor() { } | ||
shouldProtect = this.securityService.shouldProtect(); | ||
securityEnabled = this.securityService.securityEnabled(); | ||
|
||
ngOnInit(): void { | ||
get isDevEnv() { | ||
return !environment.production; | ||
} | ||
|
||
constructor( | ||
private securityService: SecurityService | ||
) { } | ||
|
||
ngOnInit(): void { | ||
} | ||
} |