How to use jsPDF with angular 2

I have done it, after doing lot of R&D , their are few steps to follow as below : Install : npm install jspdf –save typings install dt~jspdf –global –save npm install @types/jspdf –save Add following in angular-cli.json: “scripts”: [ “../node_modules/jspdf/dist/jspdf.min.js” ] html: <button (click)=”download()”>download </button> component ts: import { Component, OnInit, Inject } from … Read more

angular2-cli include custom fonts

For the people arriving here by searching: Install with npm: npm install roboto-fontface –save Add to styles in .angular-cli.json (apps[0].styles): “styles”: [ “styles.css”, “../node_modules/roboto-fontface/css/roboto/roboto-fontface.css” ], That’s all! Edit: since Angular 6 this file is called angular.json instead of angular-cli.json. Adding fonts still works the same way as before.

Angular 9 + CLI (TypeScript) – How to stop generating .spec.ts test files

For Angular 9+ (version 6+ below) 1) Copy snippet to the root of angular.json, (configures settings to all projects/globally). 2) Or copy snippet to the root of a specific project (projects.your-project-name) in angular.json (configures settings for a specific project). “schematics”: { “@schematics/angular:component”: { “style”: “scss”, “skipTests”: true }, “@schematics/angular:class”: { “skipTests”: true }, “@schematics/angular:directive”: { … Read more

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