Answers for "angular library"

0

angular library

#First create your Angular library
$ ng new my-workspace --create-application=false
$ cd my-workspace
$ ng generate library my-lib

#In order to use it in a project you have to build it first
$ ng build my-lib --configuration development
$ ng test my-lib
$ ng lint my-lib

#And then import in the app:
import { myExport } from 'my-lib';

#You can also publish it as a npm package
$ ng build my-lib
$ cd dist/my-lib
$ npm publish
Posted by: Guest on June-13-2021

Code answers related to "angular library"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language