angular.js:15567 Error: [$controller:ctrlreg] The controller with the name 'FunctionHelloworld' is not registered. https://errors.angularjs.org/1.7.8/$controller/ctrlreg?p0=FunctionHelloworld at angular.js:138 at $controller (angular.js:11677) at setupControllers (angular.js:10708) at nodeLinkFn (angular.js:10493) at compositeLinkFn (angular.js:9832) at compositeLinkFn (angular.js:9835) at publicLinkFn (angular.js:9697) at angular.js:1965 at Scope.$eval (angular.js:19393) at Scope.$apply (angular.js:19492)
please not down that i m just beginner level with angular ,and this time i m sharing code with empty string after ng-app
<body ng-app> also , i just need to print hello world..
Member
84 Points
1323 Posts
The controller with the name 'FunctionHelloworld' is not registered.[Angular js error]
Oct 22, 2019 04:29 AM|erum|LINK
Can y one help me . here is angular version i m using
/**
* @license AngularJS v1.7.8
* (c) 2010-2018 Google, Inc. http://angularjs.org
* License: MIT
*/
here is code
here is error
angular.js:15567 Error: [$controller:ctrlreg] The controller with the name 'FunctionHelloworld' is not registered.
https://errors.angularjs.org/1.7.8/$controller/ctrlreg?p0=FunctionHelloworld
at angular.js:138
at $controller (angular.js:11677)
at setupControllers (angular.js:10708)
at nodeLinkFn (angular.js:10493)
at compositeLinkFn (angular.js:9832)
at compositeLinkFn (angular.js:9835)
at publicLinkFn (angular.js:9697)
at angular.js:1965
at Scope.$eval (angular.js:19393)
at Scope.$apply (angular.js:19492)
please not down that i m just beginner level with angular ,and this time i m sharing code with empty string after ng-app
<body ng-app> also , i just need to print hello world..
Contributor
3140 Points
983 Posts
Re: The controller with the name 'FunctionHelloworld' is not registered.[Angular js error]
Oct 22, 2019 06:35 AM|Yang Shen|LINK
Hi erum,
I think in Angular, it's a different way to define a controller than:
First of all, you need to specify a range with ng-app and then specify the controller name with ng-controller.
Please refer to AngularJS Controllers for more information about how to use AngualrJS controllers.
Also, your code can be modefied like below:
You can see the result below:
Best Regard,
Yang Shen