Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Daniel Willis
I'm pleased you figured it out! :)
Ye, it was messing with my head
Thanks for the help
Daniel Willis
No problem. I know it often seems like a lot of work and a real pain in the a**, but making a Stackblitz of the problem is such a helpful thing to do.

hello everybody
I m beginer on Angular generally & 8 specifically

So I cloned a git project et than I launched an npm install tu get back all projet dependencies

and after that I installedangular with npm install -g @angular/cli@8.1.3

Finally I lauched the server with ng serve -o

var code = "formatted";
this is the compilation erros that I'v got
(shift+enter for line break) var code = "formatted";
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
 10% building 3/3 modules 0 activei 「wds」: Project is running at http://localhost:4200/webpack-dev-server/
iwds」: webpack output is served from /   
iwds」: 404s will fallback to //index.html

chunk {main} main.js, main.js.map (main) 1.99 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 122 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.15 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 3.47 MB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 339 kB [initial] [rendered]
Date: 2021-01-20T21:46:10.345Z - Hash: d7587d01caf91f2a36ea - Time: 20540ms

ERROR in src/app/accueil/components/connection/connection.component.ts:9:36 - error TS2307: Cannot find module 'src/ws-contrat/target/generated-sources/annabel-be/strict-http-response'.

9 import { StrictHttpResponse } from 'src/ws-contrat/target/generated-sources/annabel-be/strict-http-response';
src/app/activation-mdp/components/donneespersonnelles/donneespersonnelles.component.ts:10:28 - error TS2307: Cannot find module 'src/ws-contrat/target/generated-sources/annabel-be/services/ods.service'.

10 import { OdsService } from 'src/ws-contrat/target/generated-sources/annabel-be/services/ods.service';
please help I need your help
General question guys.
git checkout master
git merge new-feature
git branch -d new-feature
as you see why do they delete new features after merging it? it's from Atlassian doc
Miloš Lapiš
@mogo-edenpark Because the feature is finished and incorporated into the master.
Refused to load the image 'http://localhost:8100/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.

Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.
Please help, I got this error from browser console after I ng add angular-calendar. Now my code do not work a again
Syed Abdul Aala
I have two component and each component have their own service instance which I achieved by providing provider in component decorator. Now I have a requirement where I have to create one component dynamically using component factory resolver but I don't want component to create the instance but instead use then value I have provided, I tried to achieve this by override the the injector like in code snippet below, but it's not working, it is always creating new service instance
const resolver = this.componentFactoryResolver.resolveComponentFactory( MultipleChoiceComponent ); const injector = Injector.create({ parent: this.injector, providers: [ { provide: MultipleChoiceService, useValue: this.dataEntryService.multipleChoiceService } ] }); this.dynTypeHost.createComponent(resolver, 0, injector);
Kamran Bahadori
Hi all, I have a challenging problem, I have n angular2 (10) projects developed separately. To avoid performance problems, duplicated dependencies etc. I would like to make a single build as if it were a single project, but I don't want to drastically change the structure of these projects for example by creating sub-projects. do you think Module Federation could solve this problem? Anyone have any suggestions / experience?
Miloš Lapiš
@famousmighodaro It's somehow related to Content-Security-Policy (CSP), so what do you in <meta http-equiv="Content-Security-Policy" ... >
Miloš Lapiš
@syedabdulaala You would need to use probably useFactory (you have deps options) on a component level to set the providers more dynamically.
@bahadorik Migrate to Nx monorepo.

Is it possible to make a directive required in a component?
We have various common components that all need to make use of a directive.
I want to make sure the developer is alerted if the directive is not applied during coding.

I was hoping to use something like an interface, but don’t know if it is possible.
Any ideas anyone??

Miloš Lapiš
@cuznerdexter Use your linter functionality and create your custom rules to check this and other similar cases.
@cuznerdexter Then it's not necessary to create some fixed and complicated code on the components level.
Hi all.I need some idea to get the week range of a given month.
Please help me if anyone have done this
Stack 0
offtopic question related to chrome... doing virtual scroll on top of angular material tables inside angular app, trying to see the limits of what would be the top in case of results that i could show. Everything works fine on UI for 1.25 milion records. If i get 1.4 milion records (ye i know, don't ask me why i'm doing this instead of going with pagination), i get null as response inside chrome. It downloads payload of 600mb which is fine but response shows null and i guess chrome just can't handle it. I checked 1.4 milion in firefox and it does good with that large set. Anything regarding that or someone had similar situation to deal with?
Stack 0
tried web workers, still the same... if i hit url as plain request from within new tab, i get response... of course it takes some time but eventually it loads

Hello guys,

We're here with December's most interesting Angular meetup videos. You'll learn about module federation, hosting apps on Firebase, using Prettier for style guides and auto formatting. There's also a comparison of different rendering methods SSR (using Angular Universal) and Jamstack, a video about Cypress for fast end-to-end testing and Deno (a secure runtime for JavaScript and TypeScript) as well!

Believe us, it's worth checking out!

See for yourself here: https://blog.meetupfeed.io/angular-meetup-videos-december-2020/



Hi all, why would this not work in a template?

[isEnabled]="typeof image_data === 'string'"

        class="btn-primary p-10"
        text="{{ 'clock' | translate }}"
        [isEnabled]="typeof image_data === 'string'"
Miloš Lapiš
@mlc-mlapis at the moment I don't have <meta http-equiv="Content-Security-Policy" ... >, I am reading the link you attached to answer.
Doaa Othman
Hi all, please I want to sharing local angular libraries without npm with my other project how can I do that
Miloš Lapiš
@DoaaOthman You can use Nx monorepo.
Doaa Othman
@mlc-mlapis please could you give me suggestions of tutorial videos about it
Did anyone used the ng-packagr for inline css?
I am using background image url in my scss want to convert from svg to base 64 url .I wanted to try this https://github.com/ng-packagr/ng-packagr/blob/master/docs/embed-assets-css.md
somehow it is not working as expected
Doaa Othman
@mlc-mlapis thanks a lot
function multiply(a , b){
return a * b
shivam kumar

While I am debugging an angular app in vscode, my debugger is sometime stop in file \localhost:4200\main.js which is a minified file.
the debugger then hang up because of size of this file.

How can I add this file in skipfile list inside launch.json?? I tried adding its path but its not working.
my launch.json:

      "name": "Launch Edge",
      "request": "launch",
      "type": "pwa-msedge",
      "url": "http://localhost:4200",
      "webRoot": "${workspaceFolder}",
      "sourceMaps": true,
      "skipFiles": [
@mogo-edenpark @alenandry thanks bros, very appreciated...
Andrés Pérez

Why is Angular building the same link for these 2 routerLinks?

<a [routerLink]="['./create']">


<a [routerLink]="['../../create']">

The second should build a different link, but they are the same right now

Laxmi Gurung
Hi there,
i am working on a web app where I have been using angular as a front-end. I need to implement a mechanism when the user should receive a popup notification not like browser popup notification but for the app itself like logs. I have implemented before by fetching the server API periodically from the client side.
is there a better way where i do not have to periodically fetch data?
my backend developers are using python for the server
Miloš Lapiš
@grgsamrita Maybe PWA mode can solve it for your.