I am getting following error
Error: [ng:areq] Argument 'nameController' is not a function, got undefined http://errors.angularjs.org/1.3.7/ng/areq?p0=nameController&p1=not%20a%20function%2C%20got%20undefined
at REGEX_STRING_REGEXP (angular.js:63)
at assertArg (angular.js:1575)
at assertArgFn (angular.js:1585)
at angular.js:8416
at angular.js:7590
at forEach (angular.js:331)
at nodeLinkFn (angular.js:7577)
at compositeLinkFn (angular.js:7073)
at compositeLinkFn (angular.js:7076)
at publicLinkFn (angular.js:6952)
I tried to change the version of angular to lower one and also used CDN but it didn't work. Tried checking syntax error as well.
Is my function declartion correct? How to resolve this error.
[Plunkr][1]
http://plnkr.co/edit/HcPXYTb5p6wrsDobdGFg?p=previewenter code here