Quadratic equation solver using Angular.js