Q: Is there a simple mechanism to create a library of protractor page objects to be shared between projects? I have two Angular projects who share UI pages and am looking for a simple mechanism to share protractor page objects between them.
I explored conceptually using Angular Components, but they are not used in the Angular E2E tests. I started and will continue, exploring simple Typescript modules and decided to check whether someone has done this.
I have not written any software at this point.
The answer would suggest or point to a simple mechanism to share protractor page objects between them.

A: No limitations, you can do whatever works for you.
I have something like this
|
+-node_modules
|
+-protractor-+
             |
             +-app1
             |
             +-app2
             |
             +-node_module-+
                           |
                           +-page_one
                           |
                           +-page_two

and then in my specs require your pages like so
page_one = require("page_one");
If you don't specify a full path, node looks for node_modules folder where you are. If not, found goes one directory up the tree and check there etc until finds the right node_module

A: I solved this problem by creating an NPM package in the main project, hosting all shared page objects:
main project (shown only main files)
|
+ e2e
|
+ shared-page-objects
  |
  + index.ts
  |
  + package.json
  |
  +- page-objects
     |
     + welcome-page.ts
     + another.page.ts

The host project simply imports them. Other projects install the NPM package and simply import them:
import { WelcomePage} from 'shared-page-objects'
...
let wp = new WelcomePage();
...
el = wo.getEl();
... use the el on an assertion

