I used state params in my page to send the data from one page to another page, here's the error that I'm getting:
Syntax Error: Token ':' is unexpected, expecting [}] at column 157 of the expression
Please take a look at the code that I have written below :
<a ui-sref="EditoldAddress({id:AddressGetData.id,fullName:AddressGetData.companyName,MobileNo:AddressGetData.phoneNo,AternateMob:AddressGetData.alternatePhoneNo,contct1:AddressGetData:contactPersonName,contact2:AddressGetData.secondContactPerson,add1:AddressGetData.addressLine1,add2:AddressGetData.addressLine2,pinCode:AddressGetData.pinCode,landMrk:AddressGetData.landMark,state:AddressGetData.state,serId:AddressGetData.userId,Place:AddressGetData.place})">Edit</a>
JS Part :
.state('EditoldAddress', {
url: '/EditoldAddress/:id/:fullName/:MobileNo/:AternateMob/:contct1/:contact2/:add1/:add2/:pinCode/:landMrk/:state/:UserId/:Place',
templateUrl: 'Edit-old-address.html',
controller: 'EditoldController'
})
Thanks in advance :)
After prettifying your ui-sref
value, it looks like:
EditoldAddress({
id: AddressGetData.id,
fullName: AddressGetData.companyName,
MobileNo: AddressGetData.phoneNo,
AternateMob: AddressGetData.alternatePhoneNo,
contct1: AddressGetData
: contactPersonName,
contact2: AddressGetData.secondContactPerson,
add1: AddressGetData.addressLine1,
add2: AddressGetData.addressLine2,
pinCode: AddressGetData.pinCode,
landMrk: AddressGetData.landMark,
state: AddressGetData.state,
serId: AddressGetData.userId,
Place: AddressGetData.place
})
The part with contactPersonName
is broken.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.