Now we will move on and create a Calculator app. To do so, we'll use a form with two inputs and one drop-down to select the desired operation.
Even though the following code seems fine, our Calculator does not work as expected:
<html> <head> <title>Calculator</title> <link href="https://maxcdn.bootstrapcdn.com/bootstrap\ /3.3.6/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <div class="container"> <h1>Type 2 numbers and choose operation.</h1> <form class="form-inline"> <!-- Notice here the special attribute 'number' is passed in order to parse inputs as numbers.--> <input v-model="a" number class="form-control"> <select v-model="operator" class="form-control"> <option selected>+</option> ...