This widget manages addresses of the logged in user.
addresses | Array containing addresses of the logged in user.
|
---|
remove_address(address) | Used to delete an address from an array. |
---|---|
add_address(newAddress) | Used to add a new address to the user addresses. |
save_address(address) | Used to update an existing address from the user addresses. |
listAddresses() | List all the addresses of the logged in user. |
<ms-userAddresses>
<template v-for="address in addresses">
<p>{{address.full_name}}</p>
<p>{{address.email}}</p>
<p>{{address.phone}}</p>
<p>{{address.address</p>
<p>{{address.city}}</p>
<p>{{address.state}}</p>
<p>{{address.country}}</p>
<p>{{address.zip}}</p>
</template>
//If u want to delete address form user addresses
<span role="button" class="badge text-bg-danger small"
@click="deleteAddress(address)">
{{ms.filters.translate('Remove')}}
</span>
</ms-userAddresses>
<div ms-widget="ms.userAddresses">
<div data-ng-repeat="address in addresses" >
<p>{{address.full_name}}</p>
<p>{{address.email}}</p>
<p>{{address.phone}}</p>
<p>{{address.address</p>
<p>{{address.city}}</p>
<p>{{address.state}}</p>
<p>{{address.country}}</p>
<p>{{address.zip}}</p>
</div>
//If u want to delete address form user addresses
<button data-ng-click="remove_address(address)"
class="btn btn-danger btn-sm ms-mb-s" title="Delete">
Remove
</button>
</div>