Fix change detection in app component

pull/592/head
Chocobozzz 2018-05-22 09:42:05 +02:00
父節點 e7eb5b3997
當前提交 f954b5da2a
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 583A612D890159BE
共有 5 個檔案被更改,包括 4 行新增11 行删除

查看文件

@ -22,7 +22,7 @@
<my-menu></my-menu>
</div>
<div class="main-col container-fluid" [ngClass]="getMainColClasses()">
<div class="main-col container-fluid" [ngClass]="{ expanded: isMenuDisplayed === false }">
<div class="main-row">
<router-outlet></router-outlet>

查看文件

@ -112,11 +112,4 @@ export class AppComponent implements OnInit {
window.scrollTo(0, 0)
this.isMenuDisplayed = !this.isMenuDisplayed
}
getMainColClasses () {
// Take all width is the menu is not displayed
if (this.isMenuDisplayed === false) return [ 'expanded' ]
return []
}
}

查看文件

@ -98,7 +98,7 @@ function lineFeedToHtml (obj: object, keyToNormalize: string) {
// Try to cache a little bit window.innerWidth
let windowInnerWidth = window.innerWidth
setInterval(() => windowInnerWidth = window.innerWidth, 500)
// setInterval(() => windowInnerWidth = window.innerWidth, 500)
function isInSmallView () {
return windowInnerWidth < 600

查看文件

@ -1,5 +1,5 @@
export const environment = {
production: false,
hmr: true,
apiUrl: 'http://192.168.1.42:9000'
apiUrl: 'http://localhost:9000'
}