Kind: Class
Source: Pams/Web/Pams.Web/Client/app/models/common/address.model.ts (line 6)
Part of: Pams
Address represents address data in the client-side model layer. Its clone() method creates a separate Address instance for workflows that need to copy address data before editing or passing it to another part of the application.
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 Source[Address instance] --> Clone[clone()] Clone --> Copy[New Address instance]
Usage
tsimport { Address } from "../models/common/address.model";
function createEditableAddress(address: Address): Address {
const editableAddress = address.clone();
// Update the copied address without changing the source instance.
return editableAddress;
}
AI Coding Instructions
- Use
clone()before editing address data that may also be referenced by existing UI state or API models. - Treat the cloned result as a separate
Addressinstance from the source object. - Keep address-specific transformations close to the caller that owns the edit workflow.
- Avoid mutating a shared
Addressinstance when a copy is required for comparison, cancellation, or form editing.
Used by
13 references from 13 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (13)
BranchDetailsComponent—Pams/Web/Pams.Web/Client/app/components/configuration/company/main-branch/branch-details.component.ts:1NewBranchComponent—Pams/Web/Pams.Web/Client/app/components/configuration/company/main-branch/new.branch.component.ts:1InvoiceDetailsComponent—Pams/Web/Pams.Web/Client/app/components/invoices/invoice-details/invoice-details.component.ts:1AccountDetailsComponent—Pams/Web/Pams.Web/Client/app/components/market/account-details/account-details.component.ts:1ClientViewEditComponent—Pams/Web/Pams.Web/Client/app/components/market/client/client-view-edit/client-view-edit.component.ts:1PrincipalViewEditComponent—Pams/Web/Pams.Web/Client/app/components/market/principles/principles-view-edit/principles-view-edit.component.ts:1AddressComponent—Pams/Web/Pams.Web/Client/app/components/shared/address/address.component.ts:1LocationDropdownComponent—Pams/Web/Pams.Web/Client/app/components/shared/dropdown/location-dropdown/location-dropdown.component.ts:1
…and 5 more.
Was this page helpful?