I need to make a post-type in my simple angular app... I have a json file with contacts
{
"contacts": [
{
"name": "Alf",
"tel": [
{
"home": "0134567890"
}
],
"address": "1 A Road, A Town, A County, AB123CD",
"email": "something@somehost.com"
},
{
"name": "Andrew",
"tel": [
{
"mobile": "0774567890"
}
],
"address": "1 A Road, A Town, A County, AB123CD",
"email": "something@somehost.com"
},
{
"name": "Zoe",
"tel": [
{
"mobile": "07712456789"
}
],
"address": "1 A Road, A Town, A County, AB123CD",
"email": "something@somehost.com"
}
]
}
I do not need an admin or db as I will be maintaining the site. Using the above i would like to click on a list item alf
which will change the route and view to domain.com/alf
or domain.com/contact/alf
which will use the contact
template view with alf's
info (from the json)
Google searching has left me with only database/ server / admin tutorials. But my need is much simpler.
So in a nutshell — I need a route that accepts a url parameter which will load a view with data corresponding to the provided url parameter