How to Display the Index in Reverse Order for *ngFor Angular

Let's say that we have data in array e.g tasks = ['task 5', 'task 4', 'task 3', 'task 2', 'task 1']. Now when we will use ngFor then it will display the data like this: *ngFor="let task of tasks; let i = index" Task #{{i}}: {{task}} Output: Task 0: task 5 Task 1: task 4 Task 2: task 3 Task 3: task 2 Task 4: task 1 But we want to reverse the order of only the index. In order to do that in ts file of the angular components, define a veriable named as totalTasks: number. Now make it...
forward

How To Develop Custom WordPress Plugin from Scratch using OOP

This post describes the exact step to develop a custom WordPress plugin from scratch using Object-Oriented Programming. Go to https://wppb.me/, fill the form and download your zip file Edit the main file (plugin-name.php) and update texts like 'description' if you want Create all custom post types, make sure that the custom post type title is not longer than 20 characters otherwise you will get an error 'invalid post type' function create_post_uni_lms_classes_std() { register_post_type( 'uni_lms_classes', array( 'labels' => array( 'name' => __('Classes','unilms'), 'singular_name' => __('Class','unilms'), 'add_new' => __('Add New','unilms'), 'add_new_item' => __('Add New Class','unilms'), 'edit' => __('Edit','unilms'), 'edit_item' => __('Edit Class','unilms'),...
forward

How to Deploy NodeJS App in GoDaddy Shared Hosting

This post describes the exact steps to deploy a NodeJS app on GoDaddy shared hosting. Log in to GoDaddy account and click Manage HostingIn settings, click server and make sure SSH access is onClick manage against SSH access and note down the credentialsInstall a tool (Putty, MobaXTerm, etc.) to connect to the server using SSHOnce connected cd into the directory where you want to deploy a NodeJS app. It will be public_html for main domain or public_html/ in case of subdomainrun the command: wget https://nodejs.org/dist/v6.9.2/node-v6.9.2-linux-x64.tar.xzAbove command will install the node in your directoryUpload your app in zip format and extract...
forward