
Test Driven Development is a programming practice that has been preached and promoted by every developer community on the planet. And yet it's a routine that is largely neglected by a developer while learning a new framework. Writing unit tests from day one will help you to write better code, spot bugs with ease, and maintain a better development workflow.
Angular, being a full-fledged front-end development platform, has its own set of tools for testing. We will be using the following tools in this tutorial:
it('should have a defined component', () => {
expect(component).toBeDefined();
});TestBed and ComponentFixtures and helper functions such as async and fakeAsync are part of the @angular/core/testing package. Getting acquainted with these utilities is necessary if you want to write tests that reveal how your components interact with their own template, services, and other components.We are not going to cover functional tests using Protractor in this tutorial. Protractor is a popular end-to-end test framework that interacts with the application's UI using an actual browser.
In this tutorial, we are more concerned about testing components and the component's logic. However, we will be writing a couple of tests that demonstrate basic UI interaction using the Jasmine framework.
The goal of this tutorial is to create the front-end for a Pastebin application in a test-driven development environment. In this tutorial, we will follow the popular TDD mantra, which is "red/green/refactor". We will write tests that initially fail (red) and then work on our application code to make them pass (green). We shall refactor our code when it starts to stink, meaning that it gets bloated and ugly.
We will be writing tests for components, their templates, services, and the Pastebin class. The image below illustrates the structure of our Pastebin application. The items that are grayed out will be discussed in the second part of the tutorial.

In the first part of the series, we will solely concentrate on setting up the testing environment and writing basic tests for components. Angular is a component-based framework; therefore, it is a good idea to spend some time getting acquainted with writing tests for components. In the second part of the series, we will write more complex tests for components, components with inputs, routed components, and services. By the end of the series, we will have a fully functioning Pastebin application that looks like this.



In this tutorial, you will learn how to:
The entire code for the tutorial is available on Github.
https://github.com/blizzerand/pastebin-angular
Clone the repo and feel free to check out the code if you are in doubt at any stage of this tutorial. Let's get started!
The developers at Angular have made it easy for us to set up our test environment. To get started, we need to install Angular first. I prefer using the Angular-CLI. It's an all-in-one solution that takes care of creating, generating, building and testing your Angular project.
ng new Pastebin
Here is the directory structure created by Angular-CLI.
Since our interests are inclined more towards the testing aspects in Angular, we need to look out for two types of files.
karma.conf.js is the configuration file for the Karma test runner and the only configuration file that we will need for writing unit tests in Angular. By default, Chrome is the default browser-launcher used by Karma to capture tests. We will create a custom launcher for running the headless Chrome and add it to the browsers array.
/*karma.conf.js*/
browsers: ['Chrome','ChromeNoSandboxHeadless'],
customLaunchers: {
ChromeNoSandboxHeadless: {
base: 'Chrome',
flags: [
'--no-sandbox',
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
'--headless',
'--disable-gpu',
// Without a remote debugging port, Google Chrome exits immediately.
' --remote-debugging-port=9222',
],
},
},The other type of file that we need to look out for is anything that ends with .spec.ts. By convention, the tests written in Jasmine are called specs. All the test specs should be located inside the application's src/app/ directory because that's where Karma looks for the test specs. If you create a new component or a service, it is important that you place your test specs inside the same directory that the code for the component or service resides in.
The ng new command has created an app.component.spec.ts file for our app.component.ts. Feel free to open it up and have a good look at the Jasmine tests in Angular. Even if the code doesn't make any sense, that is fine. We will keep AppComponent as it is for now and use it to host the routes at some later point in the tutorial.
We need a Pastebin class to model our Pastebin inside the components and tests. You can create one using the Angular-CLI.
ng generate class Pastebin
Add the following logic to Pastebin.ts:
export class Pastebin {
id: number;
title: string;
language: string;
paste: string;
constructor(values: Object = {}) {
Object.assign(this, values);
}
}
export const Languages = ["Ruby","Java", "JavaScript", "C", "Cpp"];
We have defined a Pastebin class, and each instance of this class will have the following properties:
id titlelanguagepasteCreate another file called pastebin.spec.ts for the test suite.
/* pastebin.spec.ts */
//import the Pastebin class
import { Pastebin } from './pastebin';
describe('Pastebin', () => {
it('should create an instance of Pastebin',() => {
expect(new Pastebin()).toBeTruthy();
});
})The test suite starts with a describe block, which is a global Jasmine function that accepts two parameters. The first parameter is the title of the test suite, and the second one is its actual implementation. The specs are defined using an it function that takes two parameters, similar to that of the describe block.
Multiple specs (it blocks) can be nested inside a test suite (describe block). However, ensure that the test suite titles are named in such a way that they are unambiguous and more readable because they are meant to serve as a documentation for the reader.
Expectations, implemented using the expect function, are used by Jasmine to determine whether a spec should pass or fail. The expect function takes a parameter which is known as the actual value. It is then chained with another function that takes the expected value. These functions are called matcher functions, and we will be using the matcher functions like toBeTruthy(), toBeDefined(), toBe(), and toContain() a lot in this tutorial.
expect(new Pastebin()).toBeTruthy();
So with this code, we've created a new instance of the Pastebin class and expect it to be true. Let's add another spec to confirm that the Pastebin model works as intended.
it('should accept values', () => {
let pastebin = new Pastebin();
pastebin = {
id: 111,
title: "Hello world",
language: "Ruby",
paste: 'print "Hello"',
}
expect(pastebin.id).toEqual(111);
expect(pastebin.language).toEqual("Ruby");
expect(pastebin.paste).toEqual('print "Hello"');
});
We've instantiated the Pastebin class and added a few expectations to our test spec. Run ng test to verify that all the tests are green.
Generate a service using the below command.
ng generate service pastebin
PastebinService will host the logic for sending HTTP requests to the server; however, we don't have a server API for the application we are building. Therefore, we are going to simulate the server communication using a module known as InMemoryWebApiModule.
Install angular-in-memory-web-api via npm:
npm install angular-in-memory-web-api --save
Update AppModule with this version.
/* app.module.ts */
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
//Components
import { AppComponent } from './app.component';
//Service for Pastebin
import { PastebinService } from "./pastebin.service";
//Modules used in this tutorial
import { HttpModule } from '@angular/http';
//In memory Web api to simulate an http server
import { InMemoryWebApiModule } from 'angular-in-memory-web-api';
import { InMemoryDataService } from './in-memory-data.service';
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
HttpModule,
InMemoryWebApiModule.forRoot(InMemoryDataService),
],
providers: [PastebinService],
bootstrap: [AppComponent]
})
export class AppModule { }
Create an InMemoryDataService that implements InMemoryDbService.
/*in-memory-data.service.ts*/
import { InMemoryDbService } from 'angular-in-memory-web-api';
import { Pastebin } from './pastebin';
export class InMemoryDataService implements InMemoryDbService {
createDb() {
const pastebin:Pastebin[] = [
{ id: 0, title: "Hello world Ruby", language: "Ruby", paste: 'puts "Hello World"' },
{id: 1, title: "Hello world C", language: "C", paste: 'printf("Hello world");'},
{id: 2, title: "Hello world CPP", language: "C++", paste: 'cout<<"Hello world";'},
{id: 3, title: "Hello world Javascript", language: "JavaScript", paste: 'console.log("Hello world")'}
];
return {pastebin};
}
}Here, pastebin is an array of sample pastes that will be returned or updated when we perform an HTTP action like http.get or http.post.
/*pastebin.service.ts */
import { Injectable } from '@angular/core';
import { Pastebin } from './pastebin';
import { Http, Headers } from '@angular/http';
import 'rxjs/add/operator/toPromise';
@Injectable()
export class PastebinService {
// The project uses InMemoryWebApi to handle the Server API.
// Here "api/pastebin" simulates a Server API url
private pastebinUrl = "api/pastebin";
private headers = new Headers({'Content-Type': "application/json"});
constructor(private http: Http) { }
// getPastebin() performs http.get() and returns a promise
public getPastebin():Promise<any> {
return this.http.get(this.pastebinUrl)
.toPromise()
.then(response => response.json().data)
.catch(this.handleError);
}
private handleError(error: any): Promise<any> {
console.error('An error occurred', error);
return Promise.reject(error.message || error);
}
}The getPastebin() method makes an HTTP.get request and returns a promise that resolves to an array of Pastebin objects returned by the server.
If you get a No provider for HTTP error while running a spec, you need to import the HTTPModule to the concerned spec file.
Components are the most basic building block of an UI in an Angular application. An Angular application is a tree of Angular components.
— Angular Documentation
As highlighted earlier in the Overview section, we will be working on two components in this tutorial: PastebinComponent and AddPasteComponent. The Pastebin component consists of a table structure that lists all the paste retrieved from the server. The AddPaste component holds the logic for creation of new pastes.
Go ahead and generate the components using Angular-CLI.
ng g component --spec=false Pastebin
The --spec=false option tells the Angular-CLI not to create a spec file. This is because we want to write unit tests for components from scratch. Create a pastebin.component.spec.ts file inside the pastebin-component folder.
Here's the code for pastebin.component.spec.ts.
import { TestBed, ComponentFixture, async } from '@angular/core/testing';
import { DebugElement } from '@angular/core';
import { PastebinComponent } from './pastebin.component';
import { By } from '@angular/platform-browser';
import { Pastebin, Languages } from '../pastebin';
//Modules used for testing
import { HttpModule } from '@angular/http';
describe('PastebinComponent', () => {
//Typescript declarations.
let comp: PastebinComponent;
let fixture: ComponentFixture<PastebinComponent>;
let de: DebugElement;
let element: HTMLElement;
let mockPaste: Pastebin[];
// beforeEach is called once before every `it` block in a test.
// Use this to configure to the component, inject services etc.
beforeEach(()=> {
TestBed.configureTestingModule({
declarations: [ PastebinComponent ], // declare the test component
imports: [ HttpModule],
});
fixture = TestBed.createComponent(PastebinComponent);
comp = fixture.componentInstance;
de = fixture.debugElement.query(By.css('.pastebin'));
element = de.nativeElement;
});
})There's a lot going on here. Let's break it up and take one piece at a time. Within the describe block, we've declared some variables, and then we've used a beforeEach function. beforeEach() is a global function provided by Jasmine and, as the name suggests, it gets invoked once before every spec in the describe block in which it is called.
TestBed.configureTestingModule({
declarations: [ PastebinComponent ], // declare the test component
imports: [ HttpModule],
});TestBed class is a part of the Angular testing utilities, and it creates a testing module similar to that of the @NgModule class. Furthermore, you can configure TestBed using the configureTestingModule method. For instance, you can create a test environment for your project that emulates the actual Angular application, and you can then pull a component from your application module and re-attach it to this test module.
fixture = TestBed.createComponent(PastebinComponent); comp = fixture.componentInstance; de = fixture.debugElement.query(By.css('div')); element = de.nativeElement;
From the Angular documentation:
ThecreateComponentmethod returns aComponentFixture, a handle on the test environment surrounding the created component. The fixture provides access to the component instance itself and to theDebugElement, which is a handle on the component's DOM element.
As mentioned above, we've created a fixture of the PastebinComponent and then used that fixture to create an instance of the component. We can now access the component's properties and methods inside our tests by calling comp.property_name. Since the fixture also provides access to the debugElement, we can now query the DOM elements and selectors.
There is an issue with our code that we haven't yet thought of. Our component has an external template and a CSS file. Fetching and reading them from the file system is an asynchronous activity, unlike the rest of the code, which is all synchronous.
Angular offers you a function called async() that takes care of all the asynchronous stuff. What async does is keep track of all the asynchronous tasks inside it, while hiding the complexity of asynchronous execution from us. So we will now have two beforeEach functions, an asynchronous beforeEach() and a synchronous beforeEach().
/* pastebin.component.spec.ts */
// beforeEach is called once before every `it` block in a test.
// Use this to configure to the component, inject services etc.
beforeEach(async(() => { //async before is used for compiling external templates which is any async activity
TestBed.configureTestingModule({
declarations: [ PastebinComponent ], // declare the test component
imports: [ HttpModule],
})
.compileComponents(); // compile template and css
}));
beforeEach(()=> { //And here is the synchronous async function
fixture = TestBed.createComponent(PastebinComponent);
comp = fixture.componentInstance;
de = fixture.debugElement.query(By.css('.pastebin'));
element = de.nativeElement;
});
We haven't written any test specs yet. However, it's a good idea to create an outline of the specs beforehand. The image below depicts a rough design of the Pastebin component.

We need to write tests with the following expectations.
pastebinService is injected into the component, and its methods are accessible.onInit() is called.The first three tests are easy to implement.
it('should have a Component',()=> {
expect(comp).toBeTruthy();
});
it('should have a title', () => {
comp.title = 'Pastebin Application';
fixture.detectChanges();
expect(element.textContent).toContain(comp.title);
})
it('should have a table to display the pastes', () => {
expect(element.innerHTML).toContain("thead");
expect(element.innerHTML).toContain("tbody");
})
In a testing environment, Angular doesn't automatically bind the component's properties with the template elements. You have to explicitly call fixture.detectChanges() every time you want to bind a component property with the template. Running the test should give you an error because we haven't yet declared the title property inside our component.
title: string = "Pastebin Application";
Don't forget to update the template with a basic table structure.
<div class = "pastebin">
<h2> {{title}}</h2>
<table id="table" class="table table-hover table-striped">
<thead>
<tr>
<th> id </th>
<th> Title </th>
<th> Language </th>
<th> Code </th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>As for the rest of the cases, we need to inject the Pastebinservice and write tests that deal with component-service interaction. A real service might make calls to a remote server, and injecting it in its raw form will be a laborious and challenging task.
Instead, we should write tests that focus on whether the component interacts with the service as expected. We shall add specs that spy on the pastebinService and its getPastebin() method.
First, import the PastebinService into our test suite.
import { PastebinService } from '../pastebin.service';Next, add it to the providers array inside TestBed.configureTestingModule().
TestBed.configureTestingModule({
declarations:[ CreateSnippetComponent],
providers: [ PastebinService ],
});The code below creates a Jasmine spy that is designed to track all calls to the getPastebin() method and return a promise that immediately resolves to mockPaste.
//The real PastebinService is injected into the component
let pastebinService = fixture.debugElement.injector.get(PastebinService);
mockPaste = [
{ id:1, title: "Hello world", language: "Ruby", paste: "puts 'Hello'" }];
spy = spyOn(pastebinService, 'getPastebin')
.and.returnValue(Promise.resolve(mockPaste));The spy isn't concerned about the implementation details of the real service, but instead, bypasses any call to the actual getPastebin() method. Moreover, all the remote calls buried inside getPastebin() are ignored by our tests. We will be writing isolated unit-tests for Angular services in the second part of the tutorial.
Add the following tests to pastebin.component.spec.ts.
it('should not show the pastebin before OnInit', () => {
this.tbody = element.querySelector("tbody");
//Try this without the 'replace(\s\s+/g,'')' method and see what happens
expect(this.tbody.innerText.replace(/\s\s+/g, '')).toBe("", "tbody should be empty");
expect(spy.calls.any()).toBe(false, "Spy shouldn't be yet called");
});
it('should still not show pastebin after component initialized', () => {
fixture.detectChanges();
// getPastebin service is async, but the test is not.
expect(this.tbody.innerText.replace(/\s\s+/g, '')).toBe("", 'tbody should still be empty');
expect(spy.calls.any()).toBe(true, 'getPastebin should be called');
});
it('should show the pastebin after getPastebin promise resolves', async() => {
fixture.detectChanges();
fixture.whenStable().then( () => {
fixture.detectChanges();
expect(comp.pastebin).toEqual(jasmine.objectContaining(mockPaste));
expect(element.innerText.replace(/\s\s+/g, ' ')).toContain(mockPaste[0].title);
});
})The first two tests are synchronous tests. The first spec checks whether the innerText of the div element stays empty as long as the component isn't initialized. The second argument to Jasmine's matcher function is optional and is displayed when the test fails. This is helpful when you have multiple expect statements inside a spec.
In the second spec, the component is initialized (because fixture.detectChanges() is called), and the spy is also expected to get invoked, but the template should not be updated. Even though the spy returns a resolved promise, the mockPaste isn't available yet. It shouldn't be available unless the test is an asynchronous test.
The third test uses an async() function discussed earlier to run the test in an async test zone. async() is used to make a synchronous test asynchronous. fixture.whenStable() is called when all pending asynchronous activities are complemented, and then a second round of fixture.detectChanges() is called to update the DOM with the new values. The expectation in the final test ensures that our DOM is updated with the mockPaste values.
To get the tests to pass, we need to update our pastebin.component.ts with the following code.
/*pastebin.component.ts*/
import { Component, OnInit } from '@angular/core';
import { Pastebin } from '../pastebin';
import { PastebinService } from '../pastebin.service';
@Component({
selector: 'app-pastebin',
templateUrl: './pastebin.component.html',
styleUrls: ['./pastebin.component.css']
})
export class PastebinComponent implements OnInit {
title: string = "Pastebin Application";
pastebin: any = [];
constructor(public pastebinServ: PastebinService) { }
//loadPastebin() is called on init
ngOnInit() {
this.loadPastebin();
}
public loadPastebin() {
//invokes pastebin service's getPastebin() method and stores the response in `pastebin` property
this.pastebinServ.getPastebin().then(pastebin => this.pastebin = pastebin);
}
}
The template also needs to be updated.
<!--- pastebin.component.html -->
<div class = "pastebin">
<h2> {{title}}</h2>
<table id="table" class="table table-hover table-striped">
<thead>
<tr>
<th> id </th>
<th> Title </th>
<th> Language </th>
<th> Code </th>
</tr>
</thead>
<tbody>
<tr *ngFor="let paste of pastebin">
<td> {{paste.id}} </td>
<td> {{paste.title}} </td>
<td> {{paste.language}} </td>
<td> View code </td>
</tr>
</tbody>
<!--- <app-add-paste (addPasteSuccess)= 'onAddPaste($event)'> </app-add-paste> -->
</table>
</div>Generate an AddPaste component using Angular-CLI. The image below depicts the design of the AddPaste component.

The component's logic should pass the following specs.
showModal property to true. (showModal is a boolean property that turns true when the modal is displayed and false when the modal is closed.)addPaste() method.showModal property to false.We've worked out the first three tests for you. See if you can make the tests pass on your own.
describe('AddPasteComponent', () => {
let component: AddPasteComponent;
let fixture: ComponentFixture<AddPasteComponent>;
let de: DebugElement;
let element: HTMLElement;
let spy: jasmine.Spy;
let pastebinService: PastebinService;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AddPasteComponent ],
imports: [ HttpModule, FormsModule ],
providers: [ PastebinService ],
})
.compileComponents();
}));
beforeEach(() => {
//initialization
fixture = TestBed.createComponent(AddPasteComponent);
pastebinService = fixture.debugElement.injector.get(PastebinService);
component = fixture.componentInstance;
de = fixture.debugElement.query(By.css('.add-paste'));
element = de.nativeElement;
spy = spyOn(pastebinService, 'addPaste').and.callThrough();
//ask fixture to detect changes
fixture.detectChanges();
});
it('should be created', () => {
expect(component).toBeTruthy();
});
it('should display the `create Paste` button', () => {
//There should a create button in the template
expect(element.innerText).toContain("create Paste");
});
it('should not display the modal unless the button is clicked', () => {
//source-model is an id for the modal. It shouldn't show up unless create button is clicked
expect(element.innerHTML).not.toContain("source-modal");
})
it("should display the modal when 'create Paste' is clicked", () => {
let createPasteButton = fixture.debugElement.query(By.css("button"));
//triggerEventHandler simulates a click event on the button object
createPasteButton.triggerEventHandler("click",null);
fixture.detectChanges();
expect(element.innerHTML).toContain("source-modal");
expect(component.showModal).toBeTruthy("showModal should be true");
})
})DebugElement.triggerEventHandler() is the only thing new here. It is used to trigger a click event on the button element on which it is called. The second parameter is the event object, and we've left it empty since the component's click() doesn't expect one.
That's it for the day. In this first article, we learned:
In the next tutorial, we'll create new components, write more tests components with inputs and outputs, services, and routes. Stay tuned for the second part of the series. Share your thoughts through the comments.
The Best Small Business Web Designs by DesignRush
/
2Create Modern Vue Apps Using Create-Vue and Vite
/
9How to Fix the “There Has Been a Critical Error in Your Website” Error in WordPress
/
3How To Fix The “There Has Been A Critical Error in Your Website” Error in WordPress
How to Create a Privacy Policy Page in WordPress
/
5WordPress Website Maintenance Guide For Beginners
/
6How Long Does It Take to Learn JavaScript?
/
-1How Long Does it Take to Learn JavaScript
/
1The Best Way to Deep Copy an Object in JavaScript
/
-3
4
-5Adding and Removing Elements From Arrays in JavaScript
/
-3Create a JavaScript AJAX Post Request: With and Without jQuery
/
95 Real-Life Uses for the JavaScript reduce() Method
/
-7How to Enable or Disable a Button With JavaScript: jQuery vs. Vanilla
/
4How to Enable or Disable a Button With JavaScript: jQuery vs Vanilla
/
-5Confirm Yes or No With JavaScript
/
-4How to Change the URL in JavaScript: Redirecting
/
-327 Best Tab and Accordion Widget Plugins for WordPress (Free & Premium)
/
1321 Best Tab and Accordion Widget Plugins for WordPress (Free & Premium)
/
-1130 HTML Best Practices for Beginners
/
-731 Best WordPress Calendar Plugins and Widgets (With 5 Free Plugins)
25 Ridiculously Impressive HTML5 Canvas Experiments
/
-1
1How to Create a Simple Web-Based Chat Application
/
630 Popular WordPress User Interface Elements
/
-2Top 18 Best Practices for Writing Super Readable Code
/
-1Best Affiliate WooCommerce Plugins Compared
/
-1118 Best WordPress Star Rating Plugins
/
1410+ Best WordPress Twitter Widgets
/
220+ Best WordPress Booking and Reservation Plugins
/
4Working With Tables in React: Part Two
/
-3Best CSS Animations and Effects on CodeCanyon
/
-1730 CSS Best Practices for Beginners
/
3How to Create a Custom WordPress Plugin From Scratch
/
210 Best Responsive HTML5 Sliders for Images and Text… and 3 Free Options
/
-616 Best Tab and Accordion Widget Plugins for WordPress
/
-818 Best WordPress Membership Plugins and 5 Free Plugins
/
425 Best WooCommerce Plugins for Products, Pricing, Payments and More
/
110 Best WordPress Twitter Widgets
1 /
1012 Best Contact Form PHP Scripts for 2020
/
-220 Popular WordPress User Interface Elements
/
-410 Best WordPress Star Rating Plugins
/
-412 Best CSS Animations on CodeCanyon
/
-212 Best WordPress Booking and Reservation Plugins
/
-120 Best WordPress Calendar Plugins and Widgets
/
-212 Elegant CSS Pricing Tables for Your Latest Web Project
/
924 Best WordPress Form Plugins for 2020
/
-214 Best PHP Event Calendar and Booking Scripts
/
2Getting Started With Django: Newly Updated Course
/
-3Create a Blog for Each Category or Department in Your WooCommerce Store
/
48 Best WordPress Booking and Reservation Plugins
/
-15Best Exit Popups for WordPress Compared
/
18Best Exit Popups for WordPress Compared
/
-311 Best Tab & Accordion WordPress Widgets & Plugins
/
-912 Best Tab & Accordion WordPress Widgets & Plugins
1 /
3New Course: Practical React Fundamentals
/
2Short Course: Better Angular App Architecture With Modules
/
1Preview Our New Course on Angular Material
/
3Build Your Own CAPTCHA and Contact Form in PHP
/
-2Object-Oriented PHP With Classes and Objects
/
1Best Practices for ARIA Implementation
/
-5Accessible Apps: Barriers to Access and Getting Started With Accessibility
/
-4Dramatically Speed Up Your React Front-End App Using Lazy Loading
/
1615 Best Modern JavaScript Admin Templates for React, Angular, and Vue.js
/
-1615 Best Modern JavaScript Admin Templates for React, Angular and Vue.js
/
319 Best JavaScript Admin Templates for React, Angular, and Vue.js
/
2New Course: Build an App With JavaScript and the MEAN Stack
/
10Hands-on With ARIA: Accessibility Recipes for Web Apps
/
410 Best WordPress Facebook Widgets
13Hands-on With ARIA: Accessibility for eCommerce
/
4New eBooks Available for Subscribers
/
-8Hands-on With ARIA: Homepage Elements and Standard Navigation
/
11
-5Site Accessibility: Getting Started With ARIA
/
7How Secure Are Your JavaScript Open-Source Dependencies?
/
-2New Course: Secure Your WordPress Site With SSL
/
-4Testing Components in React Using Jest and Enzyme
/
-9Testing Components in React Using Jest: The Basics
/
-515 Best PHP Event Calendar and Booking Scripts
/
-1Create Interactive Gradient Animations Using Granim.js
/
11How to Build Complex, Large-Scale Vue.js Apps With Vuex
1 /
-3Examples of Dependency Injection in PHP With Symfony Components
/
-6Set Up Routing in PHP Applications Using the Symfony Routing Component
1 /
9A Beginner’s Guide to Regular Expressions in JavaScript
/
7Introduction to Popmotion: Custom Animation Scrubber
/
-8Introduction to Popmotion: Pointers and Physics
/
-12New Course: Connect to a Database With Laravel’s Eloquent ORM
/
-7How to Create a Custom Settings Panel in WooCommerce
/
-15Building the DOM faster: speculative parsing, async, defer and preload
1 /
420 Useful PHP Scripts Available on CodeCanyon
3 /
51How to Find and Fix Poor Page Load Times With Raygun
/
-1Introduction to the Stimulus Framework
/
-12Single-Page React Applications With the React-Router and React-Transition-Group Modules
712 Best Contact Form PHP Scripts
1 /
-3Getting Started With the Mojs Animation Library: The ShapeSwirl and Stagger Modules
Getting Started With the Mojs Animation Library: The Shape Module
/
-1Getting Started With the Mojs Animation Library: The HTML Module
/
3Project Management Considerations for Your WordPress Project
/
-98 Things That Make Jest the Best React Testing Framework
/
5Creating an Image Editor Using CamanJS: Layers, Blend Modes, and Events
/
1New Short Course: Code a Front-End App With GraphQL and React
/
1Creating an Image Editor Using CamanJS: Applying Basic Filters
/
-11Creating an Image Editor Using CamanJS: Creating Custom Filters and Blend Modes
/
-1Modern Web Scraping With BeautifulSoup and Selenium
/
-1Challenge: Create a To-Do List in React
1 /
-2Deploy PHP Web Applications Using Laravel Forge
/
-4Getting Started With the Mojs Animation Library: The Burst Module
/
4
-9A Gentle Introduction to Higher-Order Components in React: Best Practices
/
-5A Gentle Introduction to HOC in React: Learn by Example
/
1A Gentle Introduction to Higher-Order Components in React
/
-7Creating Pretty Popup Messages Using SweetAlert2
/
5Creating Stylish and Responsive Progress Bars Using ProgressBar.js
/
1618 Best Contact Form PHP Scripts for 2022
/
-2How to Make a Real-Time Sports Application Using Node.js
/
-3Creating a Blogging App Using Angular & MongoDB: Delete Post
/
-18Set Up an OAuth2 Server Using Passport in Laravel
/
-1Creating a Blogging App Using Angular & MongoDB: Add Post
/
-1Introduction to Mocking in Python
/
1Creating a Blogging App Using Angular & MongoDB: Show Post
/
9Creating a Blogging App Using Angular & MongoDB: Home
/
5
3Creating a Blogging App Using Angular & MongoDB: Login
/
11Creating Your First Angular App: Implement Routing
/
10Persisted WordPress Admin Notices: Part 4
/
-2Creating Your First Angular App: Components, Part 2
/
1Persisted WordPress Admin Notices: Part 3
/
4Creating Your First Angular App: Components, Part 1
/
-2How Laravel Broadcasting Works
/
-1
7Persisted WordPress Admin Notices: Part 2
/
-2Create Your First Angular App: Storing and Accessing Data
/
5Persisted WordPress Admin Notices: Part 1
/
-1Error and Performance Monitoring for Web & Mobile Apps Using Raygun
/
5Using Luxon for Date and Time in JavaScript
7 /
-3How to Create an Audio Oscillator With the Web Audio API
/
-820 Essential WordPress Utilities to Manage Your Site
/
-4Introduction to API Calls With React and Axios
/
11Beginner’s Guide to Angular 4: HTTP
/
13Rapid Web Deployment for Laravel With GitHub, Linode, and RunCloud.io
/
7Beginners Guide to Angular 4: Routing
/
-10Beginner’s Guide to Angular 4: Services
/
1Beginner’s Guide to Angular 4: Components
/
1Creating a Drop-Down Menu for Mobile Pages
/
9Introduction to Forms in Angular 4: Writing Custom Form Validators
/
510 Best WordPress Booking & Reservation Plugins
/
1Getting Started With Redux: Connecting Redux With React
/
12Getting Started With Redux: Learn by Example
/
14Getting Started With Redux: Why Redux?
/
11How to Auto Update WordPress Salts
/
-4How to Download Files in Python
/
-2
-19Eloquent Mutators and Accessors in Laravel
1 /
15
-11
1310 Best HTML5 Sliders for Images and Text
/
8Site Authentication in Node.js: User Signup
/
-2
4Introduction to Forms in Angular 4: Template-Driven Forms
/
324 Essential WordPress Utilities to Manage Your Site
/
125 Essential WordPress Utilities to Manage Your Site
/
-8Get Rid of Bugs Quickly Using BugReplay
1 /
-16Manipulating HTML5 Canvas Using Konva: Part 1, Getting Started
/
610 Must-See Easy Digital Downloads Extensions for Your WordPress Site
/
-222 Best WordPress Booking and Reservation Plugins
/
-5Understanding ExpressJS Routing
/
-615 Best WordPress Star Rating Plugins
/
12Creating Your First Angular App: Basics
/
-1Inheritance and Extending Objects With JavaScript
/
-11Introduction to the CSS Grid Layout With Examples
1 /
1
5Performant Animations Using KUTE.js: Part 5, Easing Functions and Attributes
/
-6Performant Animations Using KUTE.js: Part 4, Animating Text
/
-11Performant Animations Using KUTE.js: Part 3, Animating SVG
/
-9New Course: Code a Quiz App With Vue.js
/
-2Performant Animations Using KUTE.js: Part 2, Animating CSS Properties
8Performant Animations Using KUTE.js: Part 1, Getting Started
/
110 Best Responsive HTML5 Sliders for Images and Text (Plus 3 Free Options)
/
-3Single-Page Applications With ngRoute and ngAnimate in AngularJS
/
-14Deferring Tasks in Laravel Using Queues
/
-3
2Site Authentication in Node.js: User Signup and Login
/
8Working With Tables in React, Part Two
/
-17Working With Tables in React, Part One
/
1How to Set Up a Scalable, E-Commerce-Ready WordPress Site Using ClusterCS
/
-2New Course on WordPress Conditional Tags
/
2
-11Building With Vue.js 2 and Firebase
6 /
11
-8
1Best Unique Bootstrap JavaScript Plugins
/
-6
-1Essential JavaScript Libraries and Frameworks You Should Know About
/
5
3Vue.js Crash Course: Create a Simple Blog Using Vue.js
/
-16Build a React App With a Laravel RESTful Back End: Part 1, Laravel 5.5 API
/
2API Authentication With Node.js
/
-4Beginner’s Guide to Angular: HTTP
/
8Beginner’s Guide to Angular: Routing
/
-4Beginners Guide to Angular: Routing
/
-4Beginner’s Guide to Angular: Services
/
2Beginner’s Guide to Angular: Components
/
1How to Create a Custom Authentication Guard in Laravel
/
3Learn Computer Science With JavaScript: Part 3, Loops
/
-5Build Web Applications Using Node.js
/
1Learn Computer Science With JavaScript: Part 4, Functions
/
4Learn Computer Science With JavaScript: Part 2, Conditionals
/
13Learn Computer Science With JavaScript: Part 1, The Basics
/
-1Create Interactive Charts Using Plotly.js, Part 5: Pie and Gauge Charts
/
-8Create Interactive Charts Using Plotly.js, Part 4: Bubble and Dot Charts
/
16Create Interactive Charts Using Plotly.js, Part 3: Bar Charts
/
-11Awesome JavaScript Libraries and Frameworks You Should Know About
/
-7Create Interactive Charts Using Plotly.js, Part 2: Line Charts
/
-9Bulk Import a CSV File Into MongoDB Using Mongoose With Node.js
/
-6Build a To-Do API With Node, Express, and MongoDB
/
-6Getting Started With End-to-End Testing in Angular Using Protractor
/
10TypeScript for Beginners, Part 4: Classes
/
-15Object-Oriented Programming With JavaScript
/
410 Best Affiliate WooCommerce Plugins Compared
/
8Stateful vs. Stateless Functional Components in React
/
6Make Your JavaScript Code Robust With Flow
/
-2Build a To-Do API With Node and Restify
/
7Testing Components in Angular Using Jasmine: Part 2, Services
/
3Testing Components in Angular Using Jasmine: Part 1
/
-1Creating a Blogging App Using React, Part 6: Tags
/
-10React Crash Course for Beginners, Part 3
/
4React Crash Course for Beginners, Part 2
/
5React Crash Course for Beginners, Part 1
/
3Set Up a React Environment, Part 4
1 /
9Set Up a React Environment, Part 3
/
-9New Course: Get Started With Phoenix
/
-7Set Up a React Environment, Part 2
/
2Command Line Basics and Useful Tricks With the Terminal
/
8How to Create a Real-Time Feed Using Phoenix and React
/
-4Build a React App With a Laravel RESTful Back End: Part 1, Laravel 9 API
/
-4Creating a Blogging App Using React, Part 5: Profile Page
/
-1Pagination in CodeIgniter: The Complete Guide
/
24JavaScript-Based Animations Using Anime.js, Part 4: Callbacks, Easings, and SVG
JavaScript-Based Animations Using Anime.js, Part 3: Values, Timeline, and Playback
Learn to Code With JavaScript: Part 1, The Basics
/
210 Elegant CSS Pricing Tables for Your Latest Web Project
/
-10Getting Started With the Flux Architecture in React
/
-4Getting Started With Matter.js: The Composites and Composite Modules
/
1Getting Started With Matter.js: The Engine and World Modules
/
1310 More Popular HTML5 Projects for You to Use and Study
/
-19Understand the Basics of Laravel Middleware
/
-1Iterating Fast With Django & Heroku
/
9Creating a Blogging App Using React, Part 4: Update & Delete Posts
/
5Creating a jQuery Plugin for Long Shadow Design
/
-12How to Register & Use Laravel Service Providers
2 /
-11Unit Testing in React: Shallow vs. Static Testing
/
4Creating a Blogging App Using React, Part 3: Add & Display Post
/
13Creating a Blogging App Using React, Part 2: User Sign-Up
20 /
-5Creating a Blogging App Using React, Part 1: User Sign-In
/
59 More Popular HTML5 Projects for You to Use and Study
/
13Creating a Grocery List Manager Using Angular, Part 2: Managing Items
/
89 Elegant CSS Pricing Tables for Your Latest Web Project
/
-4Dynamic Page Templates in WordPress, Part 3
/
-4Angular vs. React: 7 Key Features Compared
/
6Creating a Grocery List Manager Using Angular, Part 1: Add & Display Items
/
2New eBooks Available for Subscribers in June 2017
/
5Create Interactive Charts Using Plotly.js, Part 1: Getting Started
/
10The 5 Best IDEs for WordPress Development (And Why)
/
-433 Popular WordPress User Interface Elements
/
2New Course: How to Hack Your Own App
/
-11How to Install Yii on Windows or a Mac
/
3What Is a JavaScript Operator?
/
-7How to Register and Use Laravel Service Providers
/
9
waly Good blog post. I absolutely love this…