Questions tagged [angular-library]

Angular library is a means for building general solutions that can be adapted for re-use in different apps. They also can be published and shared as npm packages.

Angular library is a means for building general solutions that can be adapted for re-use in different apps. They also can be published and shared as npm packages. https://angular.io/guide/libraries

629 questions
0
votes
2 answers

Use Angular Material globally with Component Library

I've created a component library in angular 6 and I would like to use Angular material components globally in my component library. I've tried importing into app.module.ts (not exposed to library) I've tried altering my main.ts to include @NgModule…
0
votes
1 answer

Accessing HTML field of Parent Component in Library's component

I have created an Angular 6 library using 'ng generate library' command. This library is used in my base component after --prod build and then importing in app.module.ts of main application. The ...Component file in Library has @Input("leftPanel")…
Harshad
  • 3
  • 2
0
votes
1 answer

No component factory found for undefined. Did you add it to @NgModule.entryComponents

I have created an Angular 6 components library. The library is based on PrimeNG components. One of the components in the library is a table component (that based on PrimeNG table) To allow users of the library to add dynamic template in a table’s…
Ronen
  • 807
  • 1
  • 13
  • 33
0
votes
1 answer

Importing custom Angular library with Tyepscript support

I have created a custom angular/ionic library that I would like to npm install and import into my other projects. I am able to do so by doing import {SharedModule} from 'library-name/src'; However, when i only leave it at 'library-name' without…
Anjil Dhamala
  • 1,544
  • 3
  • 18
  • 37
0
votes
0 answers

Detect changes of an angular library in the host project

I used the Yeoman generator (https://github.com/jvandemo/generator-angular2-library) to create an Angular library called my-lib. My angular app is consuming the created library and everything works fine. The only issue I had is that in the…
m.bouali
  • 484
  • 1
  • 4
  • 15
0
votes
1 answer

Angular 4 Library @Input

Hi guys I need a bit of help, as I can't seem to get it to work. I think I might be using the incorrect syntax or something. I am currently building Angular 4 libraries using YO https://github.com/jvandemo/generator-angular2-library So everything is…
Theunis
  • 238
  • 1
  • 15
0
votes
0 answers

"Can't bind to xx , since it isn't a know property" error in IDE , but code is working

It's in Visual Code and the directive hideFabOnscroll is from my plugin and its working as expected . I think I'm missing something ,curious to know the it. Git repo of this package Thanks
Sachin
  • 2,627
  • 1
  • 19
  • 35
0
votes
0 answers

Angular library - Type 'Subject' is not assignable to type 'Subject'

I've been following this guide to create a custom angular library but I've hit a wall with an issue rather odd. The idea behind exercise is simple, create a skeleton for a particular piece of functionality (in this case a staff directory) where a…
-1
votes
1 answer

How to share a service between project and library in angular?

I want to share my service to library because in library i want some api call. The api services are given in the project The api service given in the project import { HttpClient } from '@angular/common/http'; @Injectable({ providedIn:…
Yovans
  • 1
  • 2
-1
votes
1 answer

Angular 10 Installing and running libraries issue

My Angular App version is 10.4 version whenever I try to use a library like ngx-dropzone, ngx-file-drag-drop, ng2pdf viewer, or any other library I ran into issues it throws errors on compile time. Here are the errors. ERROR in…
-1
votes
1 answer

How to load config file from http request on initialization of library in Angular

i am trying to solve race condition in our application. We have base urls stored in extarnal config file and every request needs to access this file. Currently we are calling request for this file in constructor. // getting url from file // getEnv…
-1
votes
2 answers

Material doesn't work in Angular 13 library project

I have an Angular 13 library on the go. It works with the other modules I have already got in there, but this new module I'm moving into place uses material, and it's not happy. The new module itself is fine and builds until I make any kind of use…
Krenom
  • 1,894
  • 1
  • 13
  • 20
-1
votes
1 answer

How to build angular library with peerDependencies

I am struggling building my angular library "@myproject/auth" which has a peerDependency on "@myproject/utilities". When adding "@myproject/utilities" to my "@myproject/auth" dependencies it works but at the end of building I get: Distributing npm…
user3241778
  • 294
  • 2
  • 4
  • 20
-1
votes
1 answer

Angular library - export package.json version

I created an NX workspace containing multiple libraries and a single showcase-application that's being uploaded to the webserver. I would like to show the library version on the angular application. At the moment I'm doing it like this Export the…
Pieterjan
  • 2,738
  • 4
  • 28
  • 55
-1
votes
1 answer

Cannot find module 'atptest' or its corresponding type declarations.ts(2307)

I have created an angular library using angular cli. I can use it locally but when I publish it to npm, I cannot use it in any angular application. I install my published library using the following command and it installs without any problems: npm…
a.toraby
  • 3,232
  • 5
  • 41
  • 73
1 2 3
41
42