Quill adds empty lines after 1 empty line, ngx-quill

"ngx-quill": "^7.3.9", I add one empty line between paragraphs And after saving it becomes: Project is on Angular 2+ I tried: ::ng-deep .ngx-quill-editor p > br display: none p:not(:last-of-type) margin-bottom: 1rem But this doesn’t allow make 2 paragraps without vertical space between it Also I tried to solve it with js private removeExcessEmptyLine() { const […]

By Tatyana Molchanova
Categorized as angular, javascript, ngx-quill, quill Tagged , , ,

How on Angular Universal I can do modal or toast of Bootstrap or Material, Materialize

How to use modals in Angular Universal? Toasts, dropdowns – all stuff that works with DOM and us library js? I have the problem with implementing code import { Toast } from ‘../../../../../node_modules/bootstrap/dist/js/bootstrap.min.js’ import {DOCUMENT, isPlatformBrowser} from “@angular/common”; export class ToastComponent implements OnInit, AfterViewInit { @ViewChild(‘toast’) toast: ElementRef<HTMLDivElement> constructor(@Inject(PLATFORM_ID) private platformId: Object, @Inject(DOCUMENT) private _doc: […]

Angular 11 Universal and Bootstrap 5 Toast not working- new bootstrap TS2304: Cannot find name ‘bootstrap’, crushed

I work with Angular 11 Universal – server side rendering. I’m trying to implement Bootstrap 5 toasts (css works well), but it doesn’t understand class new bootstrap: angular.json – it’s imported properly “styles”: [ “src/styles.scss”, “node_modules/bootstrap/dist/css/bootstrap.min.css” ], “scripts”: [ “node_modules/@popperjs/core/dist/umd/popper.min.js”, “node_modules/bootstrap/dist/js/bootstrap.min.js” ] package.json “@angular/platform-browser”: “~11.2.7”, “@angular/platform-browser-dynamic”: “~11.2.7”, “@angular/platform-server”: “~11.2.7”, “@angular/router”: “~11.2.7”, “@nguniversal/express-engine”: “^11.2.1”, “@popperjs/core”: “^2.9.2”, […]

Angular 12 Universal Configuration ‘development’ is not set in the workspace

I created new project – client – on Angular 11. Then updated ng version to 12 Angular. Then installed Universal: ng add @nguniversal/express-engine Then I’m trying to run my Universal Angular, but it throws error: npm run dev:ssr [email protected] dev:ssr ng run client:serve-ssr This is a simple server for use in testing or debugging Angular […]

By Tatyana Molchanova
Categorized as angular, express, node.js, universal Tagged , , ,

Chart.js core.js:6162 ERROR Error: "line" is not a registered controller

const gainContext = this.gainRef.nativeElement.getContext(‘2d’) gainContext.canvas.height = ‘300px’ new Chart(gainContext, createChartConfig(gainConfig)) function createChartConfig({type, labels, data, label, color}: ChartConfig): ChartConfiguration<“line”>{ console.log(‘3 Chart.defaults’, Chart.defaults) return { type: “line”, data: { labels, datasets: [ { label, data, borderColor: color, stepped: false, fill: false } ] } } This is not working: It not recognize the type property as it […]

By Tatyana Molchanova
Categorized as angular, chart.js Tagged ,

Uncaught Error: Uncaught (in promise): TypeError: this.xxxService.getSomething(…).toPromise is not a function

In component: private xxxService: XxxService, const xxxList = await this.xxxService.getSomething(this.someid).toPromise(); In testing file component.spec.ts: import {Observable, of} from ‘rxjs’; const xxxServiceStub = { getSomething: () => Promise.resolve([]) }; beforeEach((async(next) => { await TestBed.configureTestingModule({ declarations: [someComponent], imports: [ …. ], providers: [ {provide: XxxService, useValue: xxxServiceStub}, ] }).compileComponents(); next(); })); API: public getSomething(someid): Observable<xxxRef[]> { return […]

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us