Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue : Angular Material 2 - not rendering in full screen #759

Closed
happyvig opened this issue Jun 24, 2016 · 11 comments
Closed

Issue : Angular Material 2 - not rendering in full screen #759

happyvig opened this issue Jun 24, 2016 · 11 comments
Assignees
Labels
needs: discussion Further discussion with the team is needed before proceeding

Comments

@happyvig
Copy link

Bug, feature request, or proposal:

Bug :

I am using Angular Material 2 for my Angular 2 app. My dashboard page is not rendering full page in the browser. Attached is the screenshot of the above mentioned issue.

image

app.component.html

<router-outlet></router-outlet>

dashboard.component.html

<md-sidenav-layout>
  <md-sidenav #sidenav mode="side" class="app-sidenav md-sidenav-over" (open)="list.focus()">
    <ul #list>
      <li> Item 1</li>
      <li> Item 2</li>
      <li> Item 3</li>
    </ul>
  </md-sidenav>

  <md-toolbar color="primary">
    <button class="app-icon-button" (click)="sidenav.toggle()">
      <i class="material-icons app-toolbar-menu">menu</i>
    </button>
    <span class="margin-left10"> Angular Material2 Portal </span>
    <span class="app-toolbar-filler"></span>
    <button md-button router-active [routerLink]=" ['Index']">
      Index
    </button>
    <button md-button router-active [routerLink]=" ['Home']">
      {{ 'HOME.TITLE' | translate }}
    </button>
    <button md-button router-active [routerLink]=" ['About'] ">
      {{ 'ABOUT.TITLE' | translate }}
    </button>
  </md-toolbar>

  <div class="app-content">
    <md-card>
      Dashboard Content Goes Here..!!
    </md-card>
  </div>

  <footer>
    <span id="footerText">Dashboard Footer</span>
  </footer>
</md-sidenav-layout>

dashboard.component.ts

import {Component, Inject, ElementRef, OnInit, AfterViewInit} from '@angular/core';
import {TranslatePipe} from 'ng2-translate/ng2-translate';

console.log('`Dashboard` component loaded asynchronously');

@Component({
  selector: 'dashboard',
  styles: [
    require('./dashboard.component.css')
  ],
  template: require('./dashboard.component.html'),
  pipes: [TranslatePipe]
})
export class Dashboard implements {
  elementRef:ElementRef;

  constructor(@Inject(ElementRef) elementRef:ElementRef) {
    this.elementRef = elementRef;
  }

  ngOnInit() {   
    console.log('hello `Dashboard` component');   
  }

}

Am I missing something here ?

Appreciate your help on this.

What is the expected behavior?

Full screen rendering

What is the current behavior?

Half screen rendering

Which versions of Angular, Material, OS, browsers are affected?

Chrome 51.0.2704.103 m (64-bit)
Node 6.x
Angular 2.0.0-rc.1
Angular Material 2 - 2.0.0-alpha.5

@jelbourn
Copy link
Member

I don't know what you mean by "full screen". Are you perhaps referring to the 8px margin that browsers add by default to the document body?

@aquinum6
Copy link

I think he meant by full and half screen that height of app is not 100% and footer is not on the bottom.
You need to get container to proper size if app content is not filling >= 100% of view. This is not a bug.

@happyvig
Copy link
Author

happyvig commented Jun 27, 2016

@aquinum6 : The height of the container is 100% already, set by default. I feel, its not needed to set to it manually.
Any other suggestions to fix the issue ?

@benelliott
Copy link
Contributor

benelliott commented Jul 1, 2016

Can you share your CSS? Can you reproduce the issue in a plunker? What happens when you set the height of your <app> and <dashboard> elements to 100%?

@kara
Copy link
Contributor

kara commented Jul 21, 2016

@happyvig It looks like you're not using the fullscreen attribute. The sidenav layout isn't fullscreen by default - you have to add it. Can you try it and report back?

@muguliebe
Copy link

muguliebe commented Jul 28, 2016

@kara i think the real problem is.. when using fullscreen attribute and footer put inside 'md-sidenav-layout', then footer is not a sticky bottom even though using absolute position and bottom zero.

@jelbourn
Copy link
Member

jelbourn commented Nov 3, 2016

@mmalerba need discussion on the behavior of md-sidenav-layout WRT taking up the whole screen

@mmalerba
Copy link
Contributor

I would avoid the fullscreen attribute, we plan to remove it. Instead structure the DOM so that md-sidenav-layout naturally takes up the full screen (see example in #1966)

@fuqiangdong01
Copy link

fuqiangdong01 commented Dec 12, 2016

set app tag {display:block;}

@sukhveersingh
Copy link

.example-container {
position: absolute;
min-height: 100% !important;

}

add this class to md-sidenav-container will resolve the issue

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
@mmalerba mmalerba added the needs: discussion Further discussion with the team is needed before proceeding label Mar 3, 2020
alexeagle pushed a commit to alexeagle/material2 that referenced this issue Nov 6, 2024
…1004)

- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes angular#759
alexeagle pushed a commit to alexeagle/material2 that referenced this issue Dec 12, 2024
…1004)

- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes angular#759
alexeagle pushed a commit to alexeagle/material2 that referenced this issue Dec 16, 2024
…1004)

- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes angular#759
alexeagle pushed a commit to alexeagle/material2 that referenced this issue Dec 18, 2024
…1004)

- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes angular#759
josephperrott pushed a commit that referenced this issue Dec 18, 2024
- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes #759
alexeagle pushed a commit to alexeagle/material2 that referenced this issue Dec 18, 2024
…1004)

- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes angular#759
kseamon pushed a commit to kseamon/material2 that referenced this issue Dec 18, 2024
…1004)

- fix hover and focus indicators on header nav items to have sufficient contrast

Fixes angular#759
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: discussion Further discussion with the team is needed before proceeding
Projects
None yet
Development

No branches or pull requests

9 participants