I have an angularjs app on one html page and it pretty much works well. But instead of using constants on a angularjs script, I'd like to make it dynamic where someone can change the values from another page. Here's some sample code I'd like to be dynamic:
// compute base_cost
$scope.base_cost = function(pages, delivery) {
// change this if you want to change price per page
price_per_page = 150;
// change this if you want to change the cost of a 3 day delivery
three_business_days = 100;
base_cost = pages * price_per_page;
if (delivery === "3 Business Days"){
base_cost = pages * price_per_page + three_business_days;
}
return base_cost;
};
I'd like the price_per_page
and three_business_days
to have a seperate page (maybe password-protected) where these variables' constants can be changed by the client when he wants to change the price, etc.
What is the simplest way to do this?
P.S. I'm already currently searching about it, but just a bit of guidance would be greatly appreciated.
Thanks