1.这个公共组件的封装
2.c-dropdown.component.ts
import { Component, OnInit, Input, EventEmitter, Output, ViewChild } from '@angular/core';
@Component({
selector: 'c-dropdown',
templateUrl: './c-dropdown.component.html',
styleUrls: ['./c-dropdown.component.scss']
})
export class CDropdownComponent implements OnInit {
ngOnInit() {
// this.totalPage = Math.ceil(this.total / this.pageSize);
}
}
3.c-dropdown.component.html
<div>
<h3>this is the component</h3>
</div>
4.c-dropdown.component.scss(空)
5.c-dropdown.module.ts
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule }