@agnoplay/angular
v1.0.0
Published
## Introduction This package provides a angular component to render a Agnoplay player in any angular project. This package makes the assumption that the window.AGNO object is available to be consumed. This can be done by adding the following script tag to
Downloads
15
Readme
@agnoplay/angular
Introduction
This package provides a angular component to render a Agnoplay player in any angular project. This package makes the assumption that the window.AGNO object is available to be consumed. This can be done by adding the following script tag to the page:
<script crossorigin="anonymous" src="https://player.agnoplay.com/static/agnoplay/js/agnoplay.js"></script>
Development
Package development
In the /projects/agnoplay-dev folder, there are files to setup a small local dev environment.
To get started, run npm run serve
.
External projects
You can import the angular component like so:
import { AgnoplayModule } from '@agnoplay/angular';
You can then include the Agnoplay module in any other module like so:
@NgModule({
...,
imports: [
...
AgnoplayModule,
],
})
You can now use the component in your template:
<agnoplay
[id]="'very-unique-id'"
[brand]="'agnoplay'"
[videoId]="'Mbdskc9KsAii'"
[options]="{...options}"
></agnoplay>
For a complete list of options, see the projects/agnoplay/src/types/BaseParams.d.ts file, or refer to your Agnoplay control panel.
Deployment
To build the component, simply run npm run build
Publish to npm
- Make sure you've build your new version and you are signed into an npm account linked to the Agnoplay organisation.
- Update the version number in
package.json
. - Run
npm publish
to publish the new version to npm.