Angular elements project

In order to create an Angular element, we need to have a separate application, and not a library, since an Angular element has to be packaged along with Angular core, polyfills, and so on.

Let's create a new application called bulma-elements using the following command:

> ng generate application bulma-elements --prefix ba? Which stylesheet format would you like to use? SASS(.scss)  [ http://sass-lang ]? Would you like to configure routing for this application? No

Now, let's create the component in our project using the following command:

> ng g c pagination --project bulma-elements

Let's add the functionality to our pagination.component.ts file:

import { Component, OnInit, Input, Output, EventEmitter, SimpleChanges ...

Get Angular Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.