databinding and commands

This commit is contained in:
Borys Levytskyi
2015-04-02 21:56:59 +03:00
parent a628050e9c
commit cfa948f6b0
6 changed files with 367 additions and 107 deletions

View File

@@ -4,7 +4,12 @@
app.service('expression', {
parse: function(string) {
var matches = twoOperandsRegex.exec(string);
if(matches == null) {
return null;
}
console.log(matches);
return {
string:matches[0],
operand1: parseInt(matches[1], 10),