Yesterday,I posted a question on AngularJS.
Then I found the solution but still I don't know the difference b/w these 2 code snippets
NOT WORKING:
{{8*9}}
{{message}}
var mainController=function($scope){
$scope.message="Hello";
};
Note: This is working fine when I watched a Video and the guy is using Plnkr.co to run this.
Working:
{{8*9}}
{{message}}
var app = angular.module("myApp", []);
app.controller("mainController", function($scope) {
$scope.message="Hello";
});
Please Someone explain it!!!!

Bhuvanesh MohankumarPosted May 15, 2016, 4:04 AM
Bhuvanesh MohankumarPosted May 17, 2016, 5:42 AM
Vipin TyagiPosted May 16, 2016, 1:34 AM
It's amazing.I was watching videos with full concentration and I missed the info.
Bhuvanesh MohankumarPosted May 13, 2016, 5:02 AM
Yes Viipiin,
its same but I have just recommended youto add the controllerto the app module here, to make you understand the difference of your code and what I have provided.
Vipin TyagiPosted May 13, 2016, 4:28 AM
Bhuvanesh MohankumarPosted May 13, 2016, 2:17 AM
Hi Viipiin,
Bhuvanesh MohankumarPosted May 13, 2016, 1:24 AM
Hi Viipiin,