Kind: Class
Source: Frontend/src/app/models/common/address.model.ts (line 6)
Part of: Frontend
Address is a shared frontend model for representing address data in the application. Its clone() method creates a separate Address instance so callers can work with a copy without changing the original model.
Methods
| Method | Signature | Returns |
|---|---|---|
clone | clone(ad: Address) | void |
Properties
| Property | Type |
|---|---|
AddressID | number |
AddressLine | string |
CountryCode | string |
CountryName | string |
Destination | string |
City | string |
State | string |
PostalCode | string |
ZipCode | string |
RowGuid | string |
AddressTypeID | number |
GovernateID | number |
HasMarker | boolean |
latitude | number |
longitude | number |
RelatedToID | number |
RelatedTypeID | number |
_RelatedToName | string |
Diagram
mermaidgraph LR A[Address instance] --> B[clone()] B --> C[New Address instance]
Usage
tsimport { Address } from '@/app/models/common/address.model';
const address = new Address();
// Create an independent copy before making changes.
const editableAddress = address.clone();
// Changes to editableAddress can be handled separately from address.
AI Coding Instructions
- Use
clone()before editing address data that may also be referenced by existing UI state. - Treat the result of
clone()as a separateAddressinstance rather than modifying the source instance. - Keep address-related shared model logic in
models/commonwhen it is used across frontend features. - Check the
Addressmodel definition before adding or copying fields so cloning behavior remains aligned with the class.
Used by
25 references from 25 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (25)
BranchDetailsComponent—Frontend/src/app/components/configuration/company/main-branch/branch-details.component.ts:1NewBranchComponent—Frontend/src/app/components/configuration/company/main-branch/new.branch.component.ts:1WarehouseConfigDetailsComponent—Frontend/src/app/components/configuration/company/warehouse/warehouse-config-details/warehouse-config-details.component.ts:1AccountDetailsComponent—Frontend/src/app/components/market/account-details/account-details.component.ts:1OrderPanelDetailsComponent—Frontend/src/app/components/sales/new-job/order-panel-details/order-panel-details.component.ts:1AddressComponent—Frontend/src/app/components/shared/address/address.component.ts:1LocationDropdownComponent—Frontend/src/app/components/shared/dropdown/location-dropdown/location-dropdown.component.ts:1DeliveryNoteDetailsComponent—Frontend/src/app/components/warehouse/delivery-note-details/delivery-note-details.component.ts:1
…and 17 more.
Was this page helpful?