In latest versions of Angular cli, we can use ng g library lib-name
command to create library. As mentioned in the Angular docs :
ng serve <project>
And:
<project> The name of the project to build. Can be an app or a library.
So, we can serve library. But when I serve I get the following errors:
Project 'ngx-tab-component' does not support the 'serve' target.
Error: Project 'ngx-tab-component' does not support the 'serve' target.
at ServeCommand.initialize (C:\Users\vahidnajafi\angular\ngx-tab-app\node_modules\@angular\cli\models\architect-command.js:53:19)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3