Updating drop down with new code when adding new code in another component

I am very new to angular. I have a component named code.ts which has a single drop down and a Add New button. I have another component with the form to add a new code. I want to re-load codes in the drop down when I add a new code. I tried to follow another thread I found here but I cannot make it to work. This is what I have in the code component:

import { AfterViewInit, Component, OnInit, OnDestroy, ViewChild, numberAttribute } from '@angular/core';
import { CommonModule, NgFor } from '@angular/common';
import { CodeNewComponent } from './code-new/code-new.component';


import { FormsModule } from '@angular/forms';
import { IUITKSelectItemProps, UITKSelectModule, UITKTableDataSource, UITKTableModule } from '@uitk/angular';
import { CodeService } from './code.service';

import { ActivatedRoute, Router, RouterModule } from '@angular/router';
import { Subscription } from 'rxjs';
import { CommonService } from '../shared/common.service';

@Component({
  selector: 'app-code',
  standalone: true,
  imports: [CommonModule, NgFor, FormsModule, RouterModule, UITKSelectModule, CodeNewComponent],
  templateUrl: './code.component.html',
  styleUrl: './code.component.css'
})
export class CodeComponent implements OnInit, OnDestroy{
  messageReceived: any;
  private subscriptionName: Subscription = new Subscription(); //important to create a subscription


  constructor(private _codeService: CodeService, 
    private _service: CommonService,
    private activatedRoute: ActivatedRoute, private router: Router)
  {    
    if(this.tableGroupCode === undefined){
      this.tableGroupCode = {id: '', label:'', value:''};
    }
    this.subscriptionName= this._service.getUpdate().subscribe
    (message => { //message contains the data sent from service
    this.messageReceived = message;
    if (message=='New Code added'){
        this.getCodes(); 
       }
    });
  }

  ngOnInit(): void {
    this.getCodes();
   }
   
   getCodes() : void
   {
    console.log('Calling this.GetCodes()');
    this._codeService.GetCodes().then(
      (codes) => {
       
          for(let entity of codes){
            this.codes.push({id: entity.Code, label: entity.Description, value: entity.Code});
          }
      },
  );
   }
   codes: IUITKSelectItemProps[] = [];
   tableGroupCode: IUITKSelectItemProps|undefined;;

   onSelect(groupCode: IUITKSelectItemProps|undefined){
    // alert(groupCode);
    if(groupCode !== undefined && groupCode?.id!='')
      {
        localStorage.setItem('selectedTableGroupCode', groupCode?.id??"");
      }
    //  console.log(localStorage.getItem('selectedTableGroupCode'));
   }

   ngOnDestroy() { // It's a good practice to unsubscribe to ensure no memory leaks
    this.subscriptionName.unsubscribe();
}
}

And this is what I have in the Submit button code for the code-new component:

  onSubmit() {
    const formValue = this.codeForm.getRawValue();
    this.newCode = new Code(
    'TableGroupCode',
    formValue.codeControl!,  
    formValue.descriptionControl!,
    'A'
    );

    this._codeService.InsertUpdateCode(this.newCode).then(
      (code) => {
          this.returnedCode = code;
      },
    );
    //alert("Table Group Code saved successfully!"); // TODO change to nice modal
    //this.alertConfig.id = 'info-alert' + this.count++;
    this.alertConfig.content = 'Table Group Code saved successfully!';
   // this.codeAdded.emit({id: formValue.codeControl!, label: formValue.descriptionControl!});
    this.alertService.setContainerConfig({position: 'top-right'});
    this.alertService.showNotification(this.alertConfig);
    this._service.sendUpdate('New Code added');    
    this.router.navigate(['/']);
   
  }

What should I do to achieve this simple task of re-loading the list of codes?

Thanks in advance

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật