Return Multiple Value From JavaScript Function

How to return multiple values from a function in JavaScript ?

Usually, you return a value from a method or function in JavaScript. You can return multiple values as a JavaScript Object.

JavaScript method returning multiple values ,

const getEmployeeInfo = () => {
  return {
    firstName : 'Jay',
    lastName : 'Woodman'
  }
}

let empName = getEmployeeInfo();
console.log(`Employee name is ${empName.firstName} ${empName.lastName}`);

// Employee name is Jay Woodman

Angular Material AutoComplete With API

In this video, you’ll learn how to use material auto complete with an API. For the sake of this tutorial we will be using APIs from JSONPlaceHolder. You’ll learn, How to use Material AutoComplete in Angular project. How to use Material AutoComplete With an API. Resources: Source Code How to Implement Angular AutoComplete With API Thanks for watching and don’t forget to show some love by liking and sharing the video. [Read More]

Angular Material AutoComplete Search

In this tutorial, you’ll learn how to implement Angular material autocomplete search. This video is a response to a user comment in my previous youtube video, Do you know any way that suggestions only appear after typing a letter, instead of suggestions already appearing when we click on the autocomplete? We have used reactive forms and are subscribing to the input value change. We have sued debouceTime to wait for the user input to finish before filtering the data. [Read More]

Angular Proxy Configuration

Proxy Configuration in Angular. How to configure proxy in Angular app to connect to API running on different port ? Assuming that you have an API running at http://localhost:3000/getData. From your Angular here is how you are making the API call, callAPIData(){ this.http.get('/api/getData').subscribe(response => { console.log('response is ', response); }) } You are expecting any HTTP calls starting with /api/ should redirect to http://localhost:3000. Taking an example of the above case, a call to /api/getData will redirect to http://localhost:3000/getData. [Read More]

Building a ToDo List App Using Angular

Building a ToDo List App Using Angular. In this Angular tutorial, you’ll learn how to build an Angular ToDo list app. You’ll be building it up from the scratch. You’ll be using Angular Material and Bootstrap for designing the app. You’ll learn, How to Create Angular App From Scratch How to use Angular Material in Angular app How to use Bootstrap in Angular application Creating Angular form using Reactive Form Creating re usable Components in Angular How to pass data from child component to parent component and vice-versa. [Read More]

Create Login Page Using Python Flask & Bootstrap

In this video you’ll learn how to create a login page using Python Flask and Bootstrap. You’ll learn, How to Install Python Flask. How to create an app using Python Flask. How to use Bootstrap in Python Flask app. How to render HTML templates and static files in Flask app. Resources: Source Code How to create Login Page Using Python Flask & Bootstrap Thanks for watching and don’t forget to show some love by liking and sharing the video. [Read More]

Delay Method Execution in Angular | DebounceTime

How to delay a method call in Angular ? How to make the API call once user has finished typing ? Assuming that you have the following Angular code sample, this.formGroup.get('employee').valueChanges .subscribe(response => { this.makeAPICall(); }) So each time the user enters a key the API call is called, which is not required. You can debounceTime to delay the method call. import { debounceTime } from 'rxjs/operators'; this.formGroup.get('employee').valueChanges .pipe(debounceTime(1000)) .subscribe(response => { this. [Read More]

Download YouTube Videos Using Python | Source Code

How to Download YouTube Videos ? You can download YouTube videos using Python. You have a library called pytube which can be used for downloading the video. This requires Python 3 to Work Start by installing the library using pip. pip install pytest Once you the library installed, use the below script to download the video: import pytube from pytube.streams import Stream def downloadVideo(link): ''' utility to download YouTube video ''' youTube = pytube. [Read More]

Dynamically Add/Remove Validations in Angular Reactive Forms

How to add validators dynamically in Angular Reactive Forms ?

You’ll learn,

  1. How to Add Validator Dynamically in Angular Reactive Forms.
  2. How to Clear Validator Dynamically in Angular Reactive Forms

Resources:

Thanks for watching and don’t forget to show some love by liking and sharing the video.

Do subscribe to the channel for receiving future updates.

Learn Angular : Modal Popup | Angular Material MatDialog

You can also follow the video tutorial on YouTube. In this Angular tutorial, you’ll learn how to show Popup in Angular application using Angular Material modal component MatDialog. Setting up the Angular application For the sake of this tutorial, I have created an Angular application using Angular CLI. Once the boilerplate code has been created, you need to install Bootstrap and Angular Material in your application. Adding Material Modal Popup Open the app. [Read More]