I am a java developer with 0 experience in java script. I am trying to learn angular and did tweak some projects to understand bit of angular. But I am definitely making some error in the basics. I am trying to run a hello world program in angular. I have an index.html and a controller in app.js. I am trying to call a function and show Hello {{something}} !!. I am unable to understand where I am going wrong. Please bear with me and clarify my mistake. here is the fiddle.
var myAppModule = angular.module('myModule', []);
var appController = function ($scope) {
$scope.greeting = returnGreeting;
};
var returnGreeting = function($scope){
return 'Hi '+$scope.name+ ' !!';
}
myAppModule.controller('appController', ['$scope',appController]);