AngularJS Error: The controller with the name myCtrl is not registered

Last Reply on Jan 29, 2018 02:18 AM By dharmendr

Posted on Jan 29, 2018 02:09 AM

I am getting error in console that my controller is not registered.

<!DOCTYPE html>
		<script src=""></script>
		<div ng-app="myApp" ng-controller="myCtrl">
		    	<h1>Add Your Quotes</h1>
		    	<button name=addQuote ng-click = "addQuoteBtn()">Add Quote</button>
		    <div ng-if="isVisible">
		    	<textarea rows="4" cols="50" placeholder="Add Quotes Here"></textarea>
			var app = angular.module('myApp', []);

			app.controller = ('myCtrl', ['$scope', function($scope){
				$scope.isVisible = false;
				$scope.addQuoteBtn = function(){
					$scope.isVisible = true;


This question does not have replies that have been liked.