After developing an AngularJS application using Skinny AngularJS Controllers, everything seems to be functioning correctly. However, I have encountered a problem with the $scope.submit
method. I am trying to assign a value to this.name
, and then retrieve it using the this.getDetails
method. Unfortunately, the value is not properly binding with the this.name
variable.
If anyone has a solution to this issue, please let me know.
script
var app = angular.module('myApp', []);
app.controller('ControllerOne', function ($scope) {
this.getDetails = function () {
return this.name;
};
$scope.submit = function () {
this.name = "Messi";
};
});