Categories
Web Development

AngularJS Quizzing: Let the Controller control logic

So far we’ve created a simple quizzing engine using AngularJS and somewhat separated the model (which is the data), from the view (which is what you see), and the controller (which sends data to the view and back).

We still had a bit of controlling being done inside the HTML: the answer value was still being checked within the HTML page. Let’s move that part inside the controller as well.

Categories
Web Development

Modules and Controllers

Yesterday I shared the basics of how to create a quiz question using AngularJS. Now even though it works, the code is not very reusable. You would have to copy and paste the same code a bunch of times for each question. So let’s work on making this quiz question reusable.

Categories
Web Development

Basic Quizzing using AngularJS

If you’ve ever needed to create a simple online quiz in HTML, you can do so easily with a littleĀ help from AngularJS, which is a popular JavaScript framework that provides some powerful tools. I’m going to start by showing you how to make a simple fill-in-the blank question.