I have am trying to learn AngularJS. I have a HTML page where I am trying to inject module but getting an error
The main js file:
var classificationModule = angular.module('mainapp',[]);
classificationModule.controller('firstcontroll',function(){
$scope.text="Goodday"
});
The HTML PAGE:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="layout" content="main"/>
<title>Classification Toolkit for Grails</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.js"></script>
<asset:javascript src="main.js"/>
</head>
<body >
<div ng-app='mainapp' ng-controller='firstcontroll'>
Hello, {{text}}
</div>
</body>
</html>
Getting the following error :
ReferenceError: $scope is not defined
I dont know what I am doing wrong.