Since the Angular release, we are used directive term and their uses in the application. they provided built-in directives but are going to see how to create our own directive?

Basically custom directive is the instruction given to DOM. where we can enhance the capability of HTML DOM.

Image for post
Image for post

There are three kinds of directives in Angular :

Image for post
Image for post

We all know that javascript is a synchronous programming language but callback functions help to make it an asynchronous programming language.

By the Definition of Javascript, MDN Promises is,

The Promise the object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.

Basically, promises are the same as real-life promises which we are making in real life.

Take an example, suppose you make a promise to your friends that are next weekend you will take them to a party.

But actually, you don't know you will get time on the weekend or not, means either…

Image for post
Image for post
Javascript - Synchronous callstack

To become a javascript or web developer we must know how javascript works internally. By understanding this you will get to know how to write non-blocking code.

The Javascript Engine

It is an engine that executes your javascript programs or code. the most popular javascript engine is V8.

Image for post
Image for post

Jasypt is a Java library which provides us to add basic encryption capabilities to projects with minimum effort and without writing any code !! 😀

let's see how we can do that…

Steps To Add Encryption Using Jasypt :

  1. Add Dependency in your pom.xml
  2. Add annotation in the Spring Boot Application main Configuration class
  3. Select a secret key to be used for encryption and decryption
  4. Generate Encrypted Key
  5. Add the encrypted key in the config file (application.properties)

1. Add Dependency in your pom.xml

In your pom.xml file add maven dependency which is easily available at maven repository. Here I am using 2.1.0 version of it.

<dependency>…

Image for post
Image for post

To access multiple database in application sprint boot makes easy way to do this. In this article, You will get idea to configure it, here we are going to configure two mysql databases for spring boot application.

Steps: -

1.Add multiple datasource configuration in to your application.properties.
2.Create Configuration class with providers @Bean i.e connection to database.
3. Create Base service to select datasource i.e Generate query.
4. Call Base from DAO to get result from two database

1.Add multiple datasource configuration in to your application.properties

Create two database names as employee and student and add its credintial details in same file.

application.properties

spring.datasource.employee.jdbc-url=jdbc:mysql://localhost/employee?autoReconnect=true&useSSL=false
spring.datasource.employee.username=empuser
spring.datasource.employee.password=emppwd
spring.datasource.employee.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.student.jdbc-url=jdbc:mysql://localhost/student?autoReconnect=true&useSSL=false spring.datasource.student.username=studuser spring.datasource.student.password=studpassword…

Image for post
Image for post

The last month gets new version release Angular 10.0.0 only 4 months after version 9 of Angular, Lets see whats new features are available to use:

Features

  1. New Date Range Picker
  2. Strict Mode
  3. Default browsers changed
  4. Typescript Updates
  5. Warnings about CommonJS imports

New Date Range Picker

Angular material now includes new date range picker, here you can select start and end date.

Prasad Sonawane

Love Programming and Writing, Software Engineer, Pune

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store