I have created a simple Angular library "test-pub" (using nx g @nrwl/angular:lib test-pub --publishable). Then I've added a very basic component to it.
super.component.html:
I want to use one of my shared libraries in another shared library, but I am getting
ERROR: Unexpected value 'LibraryModule in ...' imported by the module 'TestlibModule in ...'. Please add a @NgModule annotation.
The libraries are in separate…
I'm using the Angular CLI to build/package my component library, and I wanted to include the README.md from the root of the project instead of the file from the projects folder.
So I wanted to see if the builder had any configuration options, but…
I am trying to build my first Angular Component package using lerna and it was working pretty well until I realized I had to add "ng-packagr" to get all of the HTML bundled inline with the rest of the code. After adding that support and getting it…
I have created a components library using angular cli ng generate library,
with a component that uses *ngIf inside a module.
After successfully build and install the library in my main project,
when I try to use the component I am getting No…
I'm creating a very big library of components, services, etc., so our organisation can focus only on domain code.
In this library I have some components, service, etc. that must be kept private because they live within a certain context that I…
I forked an angular lib, added a new subfolder in projects/keycloak-angular/src/lib/core which has a .js and .d.ts file that exports a namespace. It is imported into two existing files to expand functionality.
When running npm run build I get the…
I have a new install of windows and I'm trying to run ng-packagr for the first time.
I'm getting the error:
Error: Cannot find module '@angular/compiler-cli/src/perform_compile'
at Function.Module._resolveFilename (module.js:547:15)
at…
I created a library in order to share some components between two different projects, using ng-packagr module.
The structure of the lib is
In my library
The src/package.json :
{
"name": "my-ng-library",
"version": "0.0.0",
"license": "MIT",
…
Using ng-packagr for my Angular 6 and AngularCLI app and it doesn't recognise my tsconfig paths with I do the build. A normal ng build --aot --prod works fine though.
These are my paths:
"paths": {
"@app/*": ["src/app/*"],
"@env/*":…
I'm trying to package a module X with dependencies to Y using ng-pacakgr.
X and Y have services and components.
App/module structure is :
ModuleX imports ModuleY
X.forRoot() provides ServiceY.
ServiceY is used in AppModule and ModuleX.
AppModule…
I made an Angular app with Angular CLI and added some packagr files to it. When I run pacakgr no source maps are generated to the dist folder. How do I make that happen? I have enabled them in tsconfig.json, which is all I would expect to do.
Here…
I've created an external module for angular and when i try to use it in my other project, VsCode doesn't understand the component tags.
I'm using ng-packagr to create the module.
example: