Text Editor for Angular 2.0.0

We have an application running on Angular 2.0.0. Is there a text editor npm library which gives support to Angular 2.0.0. Source: Angular Questions

Hide the legend on doughnut charts ng2-charts

I am using ng2-charts v2.2.5 since v2.4.2 is throwing some error and not working. The following is my html code <canvas baseChart [data]="doughnutChartData" [chartType]="doughnutChartType" [options]="doughnutChartOptions" [legend]="legendValue" [colors]="doughnutChartColors"></canvas> and ts code public doughnutChartOptions = { legend: {display : false} } public legendValue = false But still I can see the legend. Clearly both [legend] and [options] […]

By Lokesh
Categorized as angular, legend, ng2-charts Tagged , ,

Chart.js Pluging datalabels is throwing TypeError: Cannot read property ‘id’ of undefined at eval (Chart.js?30ef:8063)

I am using npm chart.js v2.94. and npm chartjs-plugin-datalabels v1.x and getting the following error after it is registered in the following way plugins: [ChartDataLabels], options: { error image: Plugin ID is undefined Source: Angular Questions

Create an object of arrays with combining two arrays

https://stackblitz.com/edit/angular-enctgg-dvagm3 Problem statement : Am trying to patch the hours from arr2 to arr1 and then build the whole expected o/p as given below. I was trying with map. But not sure how to traverse through nested array. code : var result = this.responseValue.map((person, index) => ({ ppmInfoId: { locationCode: person.locationCode, yearMonth: person.locationType, changeOrderId: 20 […]

Dynamic reactive form controls

Requirement : There will be two calendar inputs. If user selects the range from May 2020 to May 21. I should create 3 set of 12 dynamic reactive form controls. It should also have required field validations. PS : Am quite new to this dynamic controls. And I see in some forums to use for […]

swaggerUI dist throws me @types error in NODEjs

Extracted the dist folder from the github and used in nodejs. it works fine in my local https://github.com/swagger-api/swagger-ui/tree/master/dist But, when I build my application(MEAN stack) in ec2 box, it throws me below error ERROR in src/backend/api-docs/swagger-ui-bundle.js(70,395158): error TS8010: ‘types’ can only be used in a .ts file. not sure why the error not showing up […]

By Lokesh
Categorized as angular, node.js, swagger-ui Tagged , ,

Ng build issues in ec2 build box but not in local

I get the below error in my EC2 build box but the same is not replicable in my local ERROR in node_modules/rxjs-compat/add/observable/dom/webSocket.d.ts(1,46): error TS2307: Cannot find module ‘rxjs/websocket’. in local I have tried ng build ng build –configuration=feature ng build –prod am not sure how this causing and how to replicate the same in local […]

By Lokesh
Categorized as angular, angular-cli, build, ng-build, typescript Tagged , , , ,

add watermark while printing from html to pdf

I want to add watermark while printing from HTML to pdf in every page in this below-mentioned code: $scope.printTableFunc = function (divName) { var printContents = document.getElementById(divName).innerHTML; console.log(printContents) var popupWin = window.open(”, ‘_blank’,’width=1080,height=960′); popupWin.document.open(); popupWin.document.write(` <html> <head > <link rel=”stylesheet” type=”text/css” href=”../res/css/style.css” /> </head> <body onload=”window.print()”>${printContents} </body> </html> `); popupWin.document.close(); } Source: AngularJS

By Lokesh
Categorized as html, javascript Tagged

Chrome displaying the previous data even after reloading the page

I am working on a single page application. And I have one page which makes a server requests when ever that page is loaded. I made some changes and deployed on the server. But when I am using the live version application, it’s not reflecting the changes and whatever the changes I made it’s updating […]

By Lokesh
Categorized as google-chrome, javascript, spidermonkey, v8 Tagged

Tracking the checkbox status and use multiple data for ng-model

I have a situation here. I have two checkboxes. <span class=”flex-3″><input type=”checkbox” ng-model=”station.val.fingerprint_scanner” ng-click=”updateAccessMode(station.key,’fingerprint_scanner’, station.config_group)” /></span> <span class=”flex-3″><input type=”checkbox” ng-model=”station.val.id_card” ng-click=”updateAccessMode(station.key,’card_scanner’, station.config_group)” /></span> station.val.fingerprint_scanner and station.val.id_card are the values I am getting from database. And depending on the station.val.fingerprint_scanner and station.val.id_card the checkbox are checked and unchecked. Now since I have already assigned ng-model. How […]

By Lokesh
Categorized as javascript, user-interface Tagged ,

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