将组件的状态交给服务来控制

This commit is contained in:
小海
2020-04-23 23:18:29 +08:00
parent 2bcca393e1
commit 6f9eb718ce
8 changed files with 100 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
import {Component, ElementRef, OnInit, TemplateRef, ViewChild} from '@angular/core';
import {LoginReq} from './class/User';
import {HeaderComponent} from './components/header/header.component';
import {ComponentStateService} from './services/component-state.service';
@Component({
selector: 'app-root',
@@ -12,6 +13,9 @@ export class AppComponent {
regModal: boolean = false;
@ViewChild('headerComponent') header: HeaderComponent;
constructor(public componentStateService: ComponentStateService) {
}
registration() {
// todo :: 登录
// console.log('registration');