Angular 5 ng-content issue

Issue I have weird issue when I implement ng-content between two component in Angular 5. This my first component is FooterComponent <div class=”footer”> <ng-content select=”footer”></ng-content> </div> And footer.component.ts import { Component, OnInit } from ‘@angular/core’; @Component({ selector: ‘app-footer’, templateUrl: ‘./footer.component.html’,

Continue reading

Angular 7 – ng build –prod TypeError: Cannot read property '1' of undefined

Issue When build my Angular project for production ng buid –prod I am getting the following error: 10% building modules 3/4 modules 1 active …/client/src/styles.sass/media/client/node_modules/clean-css/lib/optimizer/level-1/optimize.js:429 context.warnings.push(‘Invalid value token at ‘ + formatPosition(value[0][1][2][0]) + ‘. Ignoring.’); TypeError: Cannot read property ‘1’

Continue reading

Angular 13 https

Issue I generated a certificate using certbot. And as a result , I received such files: cert.pem chain.pem fullchain.pem privkey.pem How to make angular 13 work over https? Solution To run ng serve with custom certificate: ng serve –ssl –ssl-key

Continue reading

How is ng.cmd generated?

Issue I’m looking through my companies JFrog dependency registry where they keep their verified/approved-by-the-firewall npm packages. While looking through the angular cli package, I noticed that there is no ng.cmd file but after running npm install on my project directory,

Continue reading

How to point Angular static assets to WWW URL

Issue When I run ng build I get this index.html file: <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <title>ApiApp</title> <base href=”/”> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <link rel=”icon” type=”image/x-icon” href=”favicon.ico”> </head> <body> <script type=”text/javascript”> const appData = JSON.parse(‘<%=json%>’); </script> <app-root></app-root> <script

Continue reading

Is this possible to change script path in index.html file after build completed?

Issue I have one angular-cli application, when i give ng build command it creates build file which has index.html file. In index.html file, scripts paths are referred like below: <script type=”text/javascript” **src=”runtime.js”**></script> <script type=”text/javascript” **src=”polyfills.js”**></script> <script type=”text/javascript” **src=”styles.js”**></script> <script type=”text/javascript”

Continue reading

Angular/cli issue

Issue I have a strange problem with angular/cli (WINDOWS). A year ago, I installed angular on my computer and I created a new project, all fine. I’ve been updating angular when a new version came out (now I’m on v7).

Continue reading

Angular build for production fails

Issue When I try to build for production my angular application with the following command ng build –prod –build-optimizer I get the following output: Date: 2019-01-29T08:39:12.193Z Hash: 05648c76cf91b1245f68 Time: 27920ms chunk {0} runtime.1eee2a92f0ed121267d0.js (runtime) 2.22 kB [entry] [rendered] chunk {1}

Continue reading

has no exported member 'ComponentsHelper

Issue I got an error when I run ‘npm start’: ERROR in [at-loader] src/app/app.component.ts:7:10 Module ‘”/Users/xx/Documents/sourcecode/xx/xx/xx/node_modules/ng2-bootstrap/index”‘ has no exported member ‘ComponentsHelper’. line 7 in app.component.ts is import { ComponentsHelper } from ‘ng2-bootstrap’; In my package.json, my version is “ng2-bootstrap”: “^1.2.4”.

Continue reading

ngUpgrade with Angular-cli

Issue I have a hybrid AngularJS (1.7.0) and Angular 6 app. I am also using @angular/upgrade module to upgrade/downgrade components and services. I have got it working using custom webpack but now I want move towards angular-cli. Can anyone suggest

Continue reading

router link attribute within the button tag doesnt work

Issue I am unable to navigate with router link attribute that is placed within the button tag. Here is my code, <button mat-raised-button color=”primary”><a routerLink=”/message-inbox”>Inbox</a></button> <button mat-raised-button color=”accent”><a routerLink=”/sent”>Sent</a></button> <a routerLink=”/message-compose”><button color=”warn”>Compose</button></a> Solution I dint import the the router module.

Continue reading