Angular 6 library shared stylesheets

For global styles, I’ve answered it in this question. Update For ng-packgr versions 9.x and above Copying assest to output folder is now directly supported as explained in this page { “$schema”: “./node_modules/ng-packagr/package.schema.json”, “name”: “@my/library”, “version”: “1.0.0”, “ngPackage”: { “assets”: [ “CHANGELOG.md”, “./styles/**/*.theme.scss” ], “lib”: { … } } } So in your project you … Read more

Angular 6, should I put secret environment variables in environment.ts file?

TL; DR You should not treat environment.ts as something similar to process.env. The name is similar but the behaviour is absolutely not. All the settings from environment.ts will directly go to your code. That’s why it is not secure to put secrets to environments.ts in any way. The browser alternatives to environment variables (process.env) are … Read more

What is the difference between ng update and npm update?

ng update: Updates the current application to latest versions. Just like Web and the entire web ecosystem, Angular is continuously improving. Angular balances continuous improvement with a strong focus on stability and making updates easy. Keeping your Angular app up-to-date enables you to take advantage of leading-edge new features, as well as optimizations and bug … Read more

Dependency @ng-bootstrap/ng-bootstrap must be explicitly whiteliste

Update This warning is coming from ng-packagr (and there’s now a section of the ng-packagr docs about this). Turns out ng-packagr is just telling you that it wants you to add all dependencies to an “allowedNonPeerDependencies”: [] property in ng-package.json (this option used to be called “whitelistedNonPeerDependencies”). For example: { “allowedNonPeerDependencies”: [ “tslib”, … ] … Read more

@types/googlemaps/index.d.ts’ is not a module

Thanks to this documentation link : https://www.typescriptlang.org/docs/handbook/triple-slash-directives.html [Angular 6+] You only have to add this line at the beginning (meaning line 1, with nothing before) of your Typescript file : /// <reference types=”@types/googlemaps” /> [Angular 5-] You only have to add this line anywhere in your Typescript file imports : import {} from “googlemaps”; Thanks … Read more

How to Create a specific version of Angular Project using CLI?

You can use npx command which is Node.js package runner, by running packages directly from the registry without effecting the globally installed package registry (-g). @next will automatically install the latest preview version from Angular repo (now days refers to version 9 rc), like so: npx @angular/cli@next new Angular9Project Otherwise, you can provide the specific … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)