Hi,
I am making an application whose frontend is in angularjs in which I am using $http.get to hit a url without reloading the page to fetch the data from a db using php and then I am printing that records in a div in which the controller and its module details are defined.However when I am implementing it's solution I am getting the following error.
Controller with this name is not registered!
My controller is defined in controller.js file whose code snippet is given below-:
var app = angular.module('myApp', []);
(function(app){
'use strict';
app.controller('Myctrl', function AddVariants($scope, $http) {
$scope.AddVariants = function() {
var expName = localStorage.ExperimentName;
var dynamicVar = localStorage.DynamicVariableName;
$('#AllVariants').show();
$http.get("homepage.php?var1=" + $scope.exp1+'&var2='+$scope.exp2+'&dv='+dynamicVar+ '&percent=' +$scope.exp3).then(function(response) {