How to generate Angular component

In this post we will see how you can generate the Angular component with Angular CLI. You can run the following command at your terminal

You will see following output in your terminal. This is the list of files generated when you generate the product-list component

Generated component has been located at src/app/product-list […]

Read more

Install Bulma CSS in Angular

In this article I am going to show you how to install Bulma CSS library in your Angular 6 project. You can use npm install command to install any package with Angular. You open up the terminal and change to working directory to location where you have created the Angular project

Next you can […]

Read more

Hello World with Angular CLI

I am going to use Angular CLI to create the famous Hello World program. If you have installed the Angular CLI you can run the following command at your terminal to create helloworld project

If you want to create the project with routing you can use the –routing flag

When you open the […]

Read more

Installing Angular CLI in your computer

In this article we will see how you can install the Angular.js for your single page application development work You need to install Node.js and the npm package manager in your computer to getting started with Angular Development With Node.js you can develop and build the client application and NPM is also Node.js application but […]

Read more

Laravel get records with Order BY

In your Laravel application if you want to get some records according to date you entered you can use the Order By clause as shown in below

Here you are using order_date field to select records by descending order. I am using pagination method to get only the first 20 records

Read more

Laravel Resource Controller

How to Creare Resource Controller You can create the resource controller using following artisan command

This resource controller will have the CRUD methods as shown in the following table Verb URI Action Route Name GET /products index products.index GET /products/create create products.create POST /products store products.store GET /products/{product} show products.show GET /products/{product}/edit edit products.edit […]

Read more

Laravel RESTful API Development

These days REST API plays major role in web development and developers are heavily use REST API when they build applications. REST is very popular because it is very simple to use and you can build it on top of the HTTP. What is REST? REST stands for Representation State Transfer. We will try to […]

Read more

How to get category of current post

Following code can be used to get the category of the current post which you are dealing with You can use the get_the_category( $post->ID ) to get the category. What you have pass here is the ID of the post. You can get the ID of the post using the $post global variable

Use […]

Read more

Javascript forEach Example

I have a Javascript array with products and its name is product_table. Product is Javascript object type and it will have following look

So product_table will have different types of products. So i can add new product to product_table using push method product_table.push( ) How do you prevent adding duplicate products to product_table instead […]

Read more

How to get subcategory of category in WordPress

When you develop WordPress plug-in widget etc you will have to get subcategory of a given category. You can use the following code to get the subcategory We are going to use get_terms($taxonomies, $args) function. If you want to learn more about this function please have look at the code reference

Read more