File tree Expand file tree Collapse file tree 11 files changed +277
-1125
lines changed Expand file tree Collapse file tree 11 files changed +277
-1125
lines changed Original file line number Diff line number Diff line change 4949 "@types/jasminewd2" : " 2.0.3" ,
5050 "@types/node" : " 8.5.2" ,
5151 "angular-cli-ghpages" : " 0.5.2" ,
52+ "angular-example-library" : " 1.1.2" ,
5253 "codelyzer" : " 4.0.2" ,
5354 "coveralls" : " 3.0.0" ,
5455 "hammerjs" : " 2.0.8" ,
6162 "karma-jasmine" : " 1.1.1" ,
6263 "karma-jasmine-html-reporter" : " 0.2.2" ,
6364 "karma-remap-istanbul" : " 0.6.0" ,
65+ "moment" : " 2.20.1" ,
6466 "protractor" : " 5.2.2" ,
6567 "source-map-explorer" : " 1.5.0" ,
6668 "standard-version" : " 4.2.0" ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {HeroTopComponent} from './heroes/hero-top/hero-top.component';
1717import { ProgressBarService } from './core/progress-bar.service' ;
1818import { ProgressInterceptor } from './shared/interceptors/progress.interceptor' ;
1919import { TimingInterceptor } from './shared/interceptors/timing.interceptor' ;
20+ import { SampleModule } from 'angular-example-library' ;
2021
2122@NgModule ( {
2223 imports : [
@@ -32,6 +33,11 @@ import {TimingInterceptor} from './shared/interceptors/timing.interceptor';
3233 }
3334 } ) ,
3435 SharedModule . forRoot ( ) ,
36+ SampleModule . forRoot ( {
37+ config : {
38+ say : 'hello'
39+ }
40+ } ) ,
3541 CoreModule ,
3642 AppRoutingModule
3743 ] ,
Original file line number Diff line number Diff line change @@ -12,15 +12,16 @@ import {RouterModule} from '@angular/router';
1212import { SearchBarComponent } from './search-bar/search-bar.component' ;
1313import { Error404Component } from './error404/error-404.component' ;
1414import { ProgressBarService } from './progress-bar.service' ;
15-
15+ import { SampleModule } from 'angular-example-library' ;
1616
1717@NgModule ( {
1818 imports : [
1919 CommonModule ,
2020 FormsModule ,
2121 RouterModule ,
2222 SharedModule ,
23- ReactiveFormsModule
23+ ReactiveFormsModule ,
24+ SampleModule
2425 ] ,
2526 exports : [
2627 NavComponent ,
Original file line number Diff line number Diff line change 11< footer >
22 < div fxFlex fxLayout ="row " fxLayout.xs ="column " fxLayoutAlign ="center center "
33 class.xs ="footer-xs ">
4- < div fxFlex ="80 ">
4+ < div fxFlex ="33 ">
55 < span > {{ 'angularExampleApp' | translate }} 2017</ span >
66 </ div >
7+ < div fxFlex ="33 " class ="text-center ">
8+ < sample-component [locale] ="currentLang "> </ sample-component >
9+ </ div >
710 < div fxFlex class ="text-right " class.xs ="footer-xs ">
811 < a href ="https://angular.io/ " target ="_blank "> < img src ="assets/images/angular.svg "> </ a >
912 </ div >
Original file line number Diff line number Diff line change 11import { Component } from '@angular/core' ;
2+ import { TranslateService } from '@ngx-translate/core' ;
23
34@Component ( {
45 selector : 'app-footer' ,
@@ -7,4 +8,9 @@ import {Component} from '@angular/core';
78} )
89
910export class FooterComponent {
11+ currentLang : string ;
12+
13+ constructor ( private translateService : TranslateService ) {
14+ this . currentLang = this . translateService . currentLang ;
15+ }
1016}
Original file line number Diff line number Diff line change 11< header >
22 < nav >
33 < div fxFlex fxLayout ="row " fxLayout.xs ="column " fxLayoutAlign ="center center ">
4- < div fxFlex ="50 ">
4+ < div fxFlex ="40 ">
55 < a mat-raised-button *ngFor ="let item of menuItems " routerLink ="{{item.link}} ">
66 {{item.name | uppercase}}
77 </ a >
88 </ div >
9+ < div fxFlex ="20 " id ="today ">
10+ < sample-component [locale] ="currentLang "> </ sample-component >
11+ </ div >
912 < div fxFlex class ="text-right ">
1013 < app-search-bar > </ app-search-bar >
1114 < button mat-icon-button [matMenuTriggerFor] ="matmenu ">
Original file line number Diff line number Diff line change 3737 img {
3838 vertical-align : middle ;
3939 }
40+
41+ #today {
42+ font-size : 0.7em ;
43+ }
4044 }
4145 }
4246}
4347
48+ @media (max-width : 807px ) {
49+ #today {
50+ width : 50% ;
51+ }
52+ }
53+
4454@media (max-width : 680px ) {
4555 :host (app-nav ) {
4656 padding-top : 0 ;
5363 height : 7em ;
5464 display : flex ;
5565 padding : 1em 2em 0 ;
66+
67+ > div {
68+ margin-top : 1em ;
69+ }
70+
71+ #today {
72+ margin-top : 1em ;
73+ }
5674 }
5775 }
5876 }
Original file line number Diff line number Diff line change @@ -15,15 +15,14 @@ export class NavComponent {
1515 appConfig : any ;
1616 menuItems : any [ ] ;
1717 progressBarMode : string ;
18-
19- private translateService : TranslateService ;
18+ currentLang : string ;
2019
2120 constructor ( @Inject ( APP_CONFIG ) appConfig : IAppConfig ,
2221 private progressBarService : ProgressBarService ,
23- translateService : TranslateService ) {
22+ private translateService : TranslateService ) {
2423 this . appConfig = appConfig ;
25- this . translateService = translateService ;
2624 this . loadMenus ( ) ;
25+ this . currentLang = this . translateService . currentLang ;
2726
2827 this . progressBarService . updateProgressBar$ . subscribe ( ( mode : string ) => {
2928 this . progressBarMode = mode ;
Original file line number Diff line number Diff line change @@ -3,17 +3,20 @@ import {MaterialModule} from './material.module';
33import { TranslateModule } from '@ngx-translate/core' ;
44import { HeroService } from '../../heroes/shared/hero.service' ;
55import { FlexLayoutModule } from '@angular/flex-layout' ;
6+ import { SampleModule } from 'angular-example-library' ;
67
78@NgModule ( {
89 imports : [
910 MaterialModule ,
1011 FlexLayoutModule ,
11- TranslateModule
12+ TranslateModule ,
13+ SampleModule
1214 ] ,
1315 exports : [
1416 MaterialModule ,
1517 FlexLayoutModule ,
16- TranslateModule
18+ TranslateModule ,
19+ SampleModule
1720 ]
1821} )
1922
You can’t perform that action at this time.
0 commit comments