Change-Id: I5475b377783ebef4a264b89f437eeebcb9bd60f8
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
export class ManagementComponent implements OnInit {
@HostBinding('@routerAnimate') routerAnimateState; //Routing animation
+ nocuster: boolean;
+ firstCustomer: string;
+
constructor(private managemencs: ManagemencsService) { }
ngOnInit() {
this.getAllCustomers();
}
-
- nocuster = true;
- firstCustomer = null;
- AllCustomersdata = [];
-
+
// Get all customers
getAllCustomers() {
this.managemencs.getAllCustomers().subscribe((data) => {
- if (data.length > 0) {
- this.nocuster = false;
- } else {
- this.nocuster = true;
- }
+ this.nocuster = data.length > 0 ? false : true;
})
}
-
createNewCustomer(customer) {
let createParams = {
customerId: customer
})
}
clearCustomerInput() {
- this.firstCustomer = null;
+ this.firstCustomer = '';
}
}