Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Aldo Velasco
@sliceofbytes thank you, I'll be sure to give it a read
David Stellini
Has anyone ever managed to bundle a dependency with an angular library, not as a peer dependency, but as an inline bundle?
From what I read, this should be dependencies: [] inside the library's package.json?

Here's an example:

dependencies: [
    "lodash": "^4.17.15",


  "whitelistedNonPeerDependencies": [

public-api.ts: (silly example, I know, just a POC)

import * as _ from 'lodash';
export default _;
prints undefined. If I grab the bundle and dump it on a page directly.
The bundle inside dist/bundle/library-name.js, has this line:
(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('lodash')) :
    (global = global || self, global['library-name'] = factory(global._));
}(this, function (_) { 'use strict';
global._ ? Again, this is a dependency, not a peerDependency - wasn't the whole idea of dependencies that they're bundled with the library?
@davidstellini I think you want bundledDependencies
David Stellini
Worked - thanks
Why does the CLI install @types/node?
Rupam Roy
is there a way i can generate a library without the lib- prefix in the component selector
Brian Henderson
hi all, if I navigate to localhost:4200/path it redirect to / with nothing in the router logs. (just using ng serve) any ideas?
Brian Henderson
gah... had a router.navigate in a nav component. (sheepish)
Has anyone tried to upgrade an Angular 7 project to Angular 8 that includes @ngtools/webpack?

Hi guys, how you doing???

I need to ask a question regarding a possible project that I will be doing!

I need to write a questionnaire with conditions

For example

Gender -> Male -> Do you have a girlfriend?

Gender -> Female -> Do you have a boyfriend?

What could be the best way to do that???

Tarmo Leppänen
and what about other choices? there is more that male and female gender, and people can have both girl- and boyfriend etc.
I know, it is just an example
I just want to think about the logic

´strictMetadataEmit´ is a flag for libraries, which shouldn't have any lazy loaded modules at all.

Can anyone elaborate why libraries shouldn't have lazy loaded modules? We're building an application platform and were planning to split features into various npm packages in a private npm registry for our inhouse devs and partners to install into their concrete project application as needed. We were hoping they could just import @company/feature-module into their angular app and have everything wired up automatically, including the (lazy-loaded) routing.

Is it possible to extract the date from the matDatepicker wihtout getting access to the date object?
I did it guys, thank you!
nextQuestion() {
    let currentQuestion = `Q${this.questionCounter}`;
    let nextQuestion = `Q${this.questionCounter}`;
    // console.log();

It is possible to use currentQuestion to call a specific question???
I solved it, thank you guys!
Ron Fogel
Hey Guys, is there any progress/update regarding ng update not working properly?
Does anyone knows which is directive to ng change in angular 7?

Am I the only one to experience very frequent false aot re-build errors looking like below? They happen to point to very random LESS-files, which usually, as in this case were not modified at all, or even those components any way related to them were not modified.

These never occur on the first clean build, but only when using ng serve --aot and making some modifications to the code. Also no matter what modifications you do, those false errors never go away until you kill ng serve and start another one. Pretty frustrating. I'm wondering if this has something to do with code maps, which are for us pretty useless regarding LESS files anyway.

ERROR in ./src/app/shared/views/cleaningMode/cleaningMode.less.shim.ngstyle.js
Module build failed (from ./node_modules/@ngtools/webpack/src/index.js):
Error: ENOENT: no such file or directory, open 'C:\PATH\TO\src\app\shared\views\cleaningMode\cleaningMode.less.shim.ngstyle.js'
    at Object.openSync (fs.js:447:3)
    at Object.readFileSync (fs.js:349:35)
    at Storage.provideSync (C:\PATH\TO\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:98:13)
    at CachedInputFileSystem.readFileSync (C:\PATH\TO\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:259:32)
    at Observable._subscribe (C:\PATH\TO\node_modules\@ngtools\webpack\src\webpack-input-host.js:35:51)
    at Observable._trySubscribe (C:\PATH\TO\node_modules\@ngtools\webpack\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\PATH\TO\node_modules\@ngtools\webpack\node_modules\rxjs\internal\Observable.js:30:22)
    at SyncDelegateHost._doSyncCall (C:\PATH\TO\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:22:20)
    at SyncDelegateHost.read (C:\PATH\TO\node_modules\@angular-devkit\core\src\virtual-fs\host\sync.js:49:21)
    at WebpackCompilerHost.readFileBuffer (C:\PATH\TO\node_modules\@ngtools\webpack\src\compiler_host.js:147:44)
    at VirtualFileSystemDecorator.readFile (C:\PATH\TO\node_modules\@ngtools\webpack\src\virtual_file_system_decorator.js:42:54)
    at processResource (C:\PATH\TO\node_modules\loader-runner\lib\LoaderRunner.js:202:11)
    at iteratePitchingLoaders (C:\PATH\TO\node_modules\loader-runner\lib\LoaderRunner.js:158:10)
    at iteratePitchingLoaders (C:\PATH\TO\node_modules\loader-runner\lib\LoaderRunner.js:165:10)
    at C:\PATH\TO\node_modules\loader-runner\lib\LoaderRunner.js:176:18
    at loadLoader (C:\PATH\TO\node_modules\loader-runner\lib\loadLoader.js:47:3)
I tried to disable source maps for styles, but that didn't help the situation
How can I acces a form control???

Hi all! I have an Angular Elements question for someone. In my component, i’m trying to simply access the variable passed into my angular element web component. The rendering of the tag seems to be fine, but the data I’m trying to pass doesn’t appear to enter my component. I have my component:

<my-component count=“0”></my-component>

inside of my component .ts file:

@Input() count: number;

my actual component renders property, but this.count is undefined. After some searching I found: https://blog.bitsrc.io/using-angular-elements-why-and-how-part-1-35f7fd4f0457 which seems like what I’m doing is correct but i’m obviously doing something wrong because I’m getting undefined. Anyone have any experience with this?

Michael Prentice
Any tips for removing this error on ng serve with Ivy?
WARNING in /Users/splaktar/Git/devintent/src/environments/environment.prod.ts is part of the TypeScript compilation but it's unused.
Add only entry points to the 'files' or 'include' properties in your tsconfig.
Alan Agius

@Splaktar yeah, you need to include only the files that are needed in the compilation.

Using the below tsconfig should solve the issue.

  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "types": []
  "files": [
  "include": [

PS: At the moment, I am working on a migration for this

@rvalimaki the issue is related to angular/angular-cli#15453


How can I solve this issue

QuestionsComponent.html:233 ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: false'. Current value: 'ngIf: true'.
Ensure whatever value is in the ngIf is not being updated/changed between change detection cycles
Ron Fogel
Hey Guys, after updating my angular cli (from 8.2.1 to 8.3.2) + core (from 8.2.2 to 8.2.4) my circle ci build fails, any idea why?
Generating ES5 bundles for differential loading...
An unhandled exception occurred: cancel after 1 retries!
See "/tmp/ng-8Tr7C1/angular-errors.log" for further details.
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! frontend-mallabee@2.0.1 build-dev: `ng build --configuration dev`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the frontend-mallabee@2.0.1 build-dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/circleci/.npm/_logs/2019-08-31T09_20_07_881Z-debug.log
Exited with code 1
I cant reproduce it locally
Did you change any environment variable???
Ron Fogel
Nothing special
Actually, the only environment variable exists when you do ng new is production: false/true (I dont have that in my environment file)
Adnan Ebrahimi
Does anyone knows how to use Service inside Libs?
I want to generate a service inside Libs and use it everywhere
export your service and add it to the public_apis
Adnan Ebrahimi
what is public_apis ?
Note that i am using Nx.dev and i have a mono repo with 3 angular apps inside it. i want to create a http libs and use it in these 3 apps
It's where you define your exports for a library
I need help with a MatTableDataSource. How can I get access to the data to modify a value that will bring me from a post?
hi i m having issue with implementing proxy using angular-cli
my proxy.conf.json looks like this