Ionic App Unable to pass param to function in form-- FIXED

Here is a plunker code that works outside of ionic

In ionic template page , the same code fails at line 24.
Any help would be appreciated

I am not able to pass a param to the function in the controller in ionic,
Unless I pass the param within quotes it does not work, but quote make my variable useless
here is the console log error
ionic.bundle.js:21162 TypeError: Cannot read property ‘match’ of undefined
at Scope.$scope.findIndex (controllers.js:295)
at fn (eval at compile (ionic.bundle.js:21977), :4:457)
at Scope.$eval (ionic.bundle.js:24678)
at Object.watchExpression (:763:37)
at Scope.$digest (ionic.bundle.js:24507)
at Scope.$delegate.proto.$digest (:844:31)
at Scope.$apply (ionic.bundle.js:24783)
at Scope.$delegate.proto.$apply (:855:30)
at ionic.bundle.js:26550
at completeOutstandingRequest (ionic.bundle.js:14226)

A quick reboot fixed the issue. How do I close this ?