Install the dependencies and start the server.
npm install
npm start
The last command should open your browser and navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Pre requisites:
- Add
@abds/components
into yourpackage.json
as a dependency
Using a Stencil built web component collection within an Angular CLI project is a two-step process. We need to:
- Include the
CUSTOM_ELEMENTS_SCHEMA
in the modules that use the components.- In this example it is used here
src/app/app.module.ts
.
- In this example it is used here
- Call
defineCustomElements()
frommain.ts
(or the project's entry point).- In this example it is imported in
src/main.ts
and then invoked later in that file. - This function is provided by Stencil's loader and it allows components to be lazy-loaded.
- In this example it is imported in
By importing the abds custom components above, Angular will let you use them freely throughout your project. All abds components use the <abds-
prefix. You can see an instance of the <abds-button>
being used in src/app/app.component.html
.
For more information about the abds components that are available and their props see our ZeroHeight documentation.
For more information about integrating with Angular see Stencil's documentation here.
This project was generated with Angular CLI version 15.1.5.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.