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 convert HTML Template to React Js Template

In this Post I am explains about Basic HTML template to React Js Template conversion. First you need to install sample React Js Project using below command. npx create-react-app html-to-react-app Take your HTML template (I downloaded My HTML template from Create two folders “src/assets” and “public/assets” in your react project. Copy all your HTMLContinue reading “How to convert HTML Template to React Js Template”

How to do custom format dates in React Js

First Create New React Project using below command create-react-app date-format cd date-format Create functional component named as date-format.js import React from ‘react’; const Date = (props) =>{ // ============ Code Here ========== } export default Date; Create Array with all months Data const montsArr = [“”,”January”, “February”, “March”, “April”, “May”, “June”, “July”, “August”, “September”, “October”,Continue reading “How to do custom format dates in React Js”

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”

User Authentication in ReactNative using ReactNavigation

Install Reactnative Cli globally. npm install -g react-native-cli Create a project react-native init ReactNativeBasicAuthentication Install Pre requests like react navigation and react native elements npm install –save react-navigation npm install –save react-native-gesture-handler npm i react-native-elements –save npm i –save react-native-vector-icons react-native link Here User authentication details save in local storage of the mobile. so replaceContinue reading “User Authentication in ReactNative using ReactNavigation”

How to Create a Blog in YII2

Hi Guys, First Install composer (click here) If you already installed leave it. Download basic Yii2 Template and follow below commands for user migrations. composer create-project nenad/yii2-basic-template blog Create a sample database and give the credentials at blog/_protected/config/db.php. Run below migration commands for user access. cd blog/_protected ./yii migrate ./yii rbac/init Then Create a tableContinue reading “How to Create a Blog in YII2”

How to convert Existing database to sequelize models using sequelize-auto

If you have existing tables in the database you want to convert into sequelize models then use sequelize auto library. Install Sequelize Auto using CLI npm install -g sequelize-auto Prerequisites:  Are you using MYSQL? Run Below command. (ignore if already installed) npm install -g mysql Are you using Postgres? Run Below command. (ignore if already installed)Continue reading “How to convert Existing database to sequelize models using sequelize-auto”

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”

Create your website with
Get started