The Angular npm Deduplication sample provides a portlet that uses the Angular framework to render its output.
This is done by providing a deduplicated instance of the Angular framework as an OSGi bundle and then leveraging it from a sample portlet.
What API(s) and/or code components does this sample highlight?
This sample is broken into two modules:
angular-consumer-portlet
angular-provider
The Angular Provider sample generates an OSGi bundle that provides a deduplicated instance of the Angular framework that portlets can share when rendering their output. The Angular Consumer portlet uses the deduplicated instance of the Angular framework.
Note: Both modules must be deployed to the server for this sample to run.
This sample leverages the npm development workflow support.
How does this sample leverage the API(s) and/or code component?
This sample uses the npm registry to download project dependencies and uses the liferay-npm-bundler tool to bundle the project dependencies inside the OSGi bundle JAR file.
To accomplish the bundling, the project’s build process relies on a build
script inside its package.json
file:
"scripts": {
"build": "tsc && liferay-npm-bundler"
},
Where Is This Sample?
This sample is built with the following build tool: