ProductCategoryComponent(this._prodcatSrv,this._router);
Future<Null> createProductCategory() async {
- await _prodcatSrv.createProdCategory(new_prod_category_name);
- await ngOnInit();
+ String id = await _prodcatSrv.createProdCategory(
+ new_prod_category_name
+ );
+ product_categories.add(new ProductCategory(
+ id,new_prod_category_name,'product_cetegory'
+ ));
+ new_prod_category_name='';
}
Future<Null> ngOnInit() async {