arundhaj

all that is technology

Dynamically Change Page Title for each Route in Angular

 

In this article, I'll show you how to dynamically change page title of an Angular app based on Route configuration.

Let say we have three components HomeComponent, MainComponent and AboutComponent. The corresponding route definition as in app-routing.module.ts file

import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular …

Multiple head revisions present ERROR in Flask Migrate

 

In this article, I'll show you the cause of the following error and how to fix it.

ERROR [root] Error: Multiple head revisions are present for given argument 'head'; 
    please specify a specific target revision, '<branchname>@head' to narrow 
    to a specific head, or 'heads' for all heads

This error …

Python Pipenv quick start guide for managing packages and virtualenv

 

In this video I'm going to show you how to start using pipenv for your python projects.

Pipenv is a packaging tool which automatically creates and manages virtualenv and packages.

# To create a new virtual environment
$ mkdir pipenv-demo && cd pipenv-demo
$ pipenv shell
(venv) $ cat Pipfile

# To install a package and …

Using SQLAlchemy Expression for Partial JSON Update

 

In this article, I'll show how to partially update JSON column using SQLAlchemy expressions in MySQL database.

Say, we have a table named TableName with a JSON column named JsonColumn and the values in this JSON column is in the following format;

{
    "JsonAttribute": 5,
    "AnotherJsonAttribute": "Hello"
}

SQL statement to update …

Progressively adding table rows with Angular

 

I will show how to progressively add new rows to the table as the last row is being edited in Angular

In, app.component.html

<table class="progressive-table">
    <thead>
        <tr>
            <th>KEY</th>
            <th>VALUE</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
    <tr *ngFor="let pair of pairs; let idx = index …