How to Configure Dynamic Environment in angular

I usually do “.environment.ts” files to set environments. When i build the code I do 3 builds those are dev, test and production. Single build is not possible for all environments i did two approaches to set environments. I will explain both here. Method 1: If you know your Test, Dev and production URLs beforeContinue reading “How to Configure Dynamic Environment in angular”

How to Create and Edit Canvas Using angular and fabric js

First Create New angular project ng new canvas-edit Install Fabric js using below command npm install fabric –save In your component.ts file import fabric js import { fabric } from ‘fabric’; Declare the variables as below Then Initialize the values and objects in ngOnInit() function Add some text to Canvas using below function Then CreateContinue reading “How to Create and Edit Canvas Using angular and fabric js”

How to import CSV File in Angular

create new angular instance using below command ng new csv-upload Past the below code in your .html file <input type=”file” #fileImportInput name=”File Upload” id=”txtFileUpload” (change)=”fileChangeListener($event)” accept=”.csv” /><table> <tr *ngFor=”let item of csvRecords”> <td *ngFor=”let single of item”>{{single}}</td> </tr></table> add this line is in your .ts file @ViewChild(‘fileImportInput’) fileImportInput: any; Create a function for read theContinue reading “How to import CSV File in Angular”

How to convert HTML Template to Angular 6 Template

First, download any HTML Template from the web. (I downloaded from here). Create an Angular application using angular-cli ng new angular-template Copy all the folders and files in downloaded template past it in src/assets folder(Except HTML files). Then Include these files into angular.json file scripts and styles section. “styles”: [   “src/styles.css”,   “src/assets/css/custom.css”,  Continue reading “How to convert HTML Template to Angular 6 Template”

Getting started with MEAN (Mysql, Express, Angular 6, Node) Part-5

I am explaining about user login and JWT. First, create the configuration file in the backend to store the secret key. I saved in backend/config/conf.js const crypto = require(‘crypto’).randomBytes(256).toString(‘hex’); // Export config object module.exports = {    secret:crypto, } Add below lines in server.js/index.js var config = require(‘./config/conf’); var jwt = require(‘jsonwebtoken’); var user =Continue reading “Getting started with MEAN (Mysql, Express, Angular 6, Node) Part-5”

Getting started with MEAN (Mysql, Express, Angular 6, Node) Part-4

I will explain about user registration using angular 6. Create 3 components sign in and signup & API service using angular-cli. ng g component components/user/signin ng g component components/user/signup ng g service services/api ng g component components/user/userslist Now check the files in src/components/user and src/services. Paste the below code in respected files. install Cryptojs forContinue reading “Getting started with MEAN (Mysql, Express, Angular 6, Node) Part-4”

Getting started with MEAN (Mysql, Express, Angular 6, Node) Part-1

In this blog, I am explaining about node and MySQL connections using sequelize, ORM & Models Creation using sequelize, jwt for user authentication and angular 6 for the frontend. First, we need to install Node, Git, any Editor you like Ex: Visual studio code, Atom, Notepad++ etc(I am using Visual studio code). Download links areContinue reading “Getting started with MEAN (Mysql, Express, Angular 6, Node) Part-1”

Create your website with WordPress.com
Get started