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