Add a directive to get page (with all regions).

Move common code into a factory.