1.0.0 • Published 5 years ago

davecar21-calculator v1.0.0

Weekly downloads
3
License
-
Repository
-
Last release
5 years ago

Davecar21Calculator

This library was generated with Angular CLI version 7.2.0.

HOW TO USE

install via npm

npm i davecar21-calculator

import module

import { Davecar21CalculatorModule } from 'davecar21-calculator';

Add selector to your component html

<d21-calculator [calcData]="data"> </d21-calculator>

data should contains object with properties of firstNumber, secondNumber, and operator.

data = {
    firstNumber: 5,
    secondNumber: 10,
    operator: 'add'
}

Code scaffolding

Run ng generate component component-name --project davecar21-calculator to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project davecar21-calculator.

Note: Don't forget to add --project davecar21-calculator or else it will be added to the default project in your angular.json file.

Build

Run ng build davecar21-calculator to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build davecar21-calculator, go to the dist folder cd dist/davecar21-calculator and run npm publish.

Running unit tests

Run ng test davecar21-calculator to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.