This commit is contained in:
Sercan Yemen 2017-07-12 18:13:08 +03:00
parent 6f159f54c8
commit 6e219181da
4 changed files with 48 additions and 3 deletions

View File

@ -43,7 +43,7 @@ export class LayoutService
*/ */
getSettings() getSettings()
{ {
return this.settings; return {...this.settings};
} }
/** /**

View File

@ -1,3 +1,35 @@
Navigation:
<md-radio-group [(ngModel)]="layoutSettings.navigation" (ngModelChange)="onSettingsChanged()">
<md-radio-button value="left">Left</md-radio-button>
<md-radio-button value="right">Right</md-radio-button>
<md-radio-button value="none">None</md-radio-button>
</md-radio-group>
<br>
<br>
Toolbar:
<md-radio-group [(ngModel)]="layoutSettings.toolbar" (ngModelChange)="onSettingsChanged()">
<md-radio-button value="below">Below</md-radio-button>
<md-radio-button value="above">Above</md-radio-button>
<md-radio-button value="none">None</md-radio-button>
</md-radio-group>
<br>
<br>
Footer:
<md-radio-group [(ngModel)]="layoutSettings.footer" (ngModelChange)="onSettingsChanged()">
<md-radio-button value="below">Below</md-radio-button>
<md-radio-button value="above">Above</md-radio-button>
<md-radio-button value="none">None</md-radio-button>
</md-radio-group>
<br>
<br>
<br>
<br>
<p> <p>
project works! project works!
</p> </p>

View File

@ -8,17 +8,26 @@ import { LayoutService } from '../../../../core/services/layout.service';
}) })
export class ProjectComponent implements OnInit export class ProjectComponent implements OnInit
{ {
layoutSettings: any;
constructor(private layoutService: LayoutService) constructor(private layoutService: LayoutService)
{ {
this.layoutService.setSettings({ /*this.layoutService.setSettings({
navigation: 'left', navigation: 'left',
toolbar : 'above', toolbar : 'above',
footer : 'above' footer : 'above'
}); });*/
// this.layoutSettings = Object.assign(this.layoutSettings, this.layoutService.getSettings());
}
onSettingsChanged()
{
this.layoutService.setSettings({...this.layoutSettings});
} }
ngOnInit() ngOnInit()
{ {
this.layoutSettings = this.layoutService.getSettings();
} }
} }

View File

@ -16,4 +16,8 @@ body {
padding-left: 64px; padding-left: 64px;
} }
} }
> md-sidenav-container {
height: 100%;
}
} }