Click here to Skip to main content
15,923,120 members

Comments by vanandrao1 (Top 1 by date)

vanandrao1 4-Jun-14 14:00pm View    
$(document).ready(function(){
var myApp = angular.module("myApp", []);
myApp.controller("EmpCtrl", ['$scope', function ($scope) {
$scope.FirstName = "Angular";
$scope.LastName = "JS";
} ]);
});

</script>
<script type='text/javascript' src="angular.js"></script>

This is what the code should be if you want angular to run inside document.ready().include script of angular at the end as it excutes after html if declared first script written after that is not included under the module object.