Function to get URI params in a controller