Permalink
Browse files

first practice app created.

  • Loading branch information...
1 parent e6537e6 commit 0d3e6316daa89071a1c5c9c29d04c969241ab0fa samal committed May 25, 2014
View
@@ -0,0 +1,15 @@
+/**
+ * Controller binding the scope to the view.
+*/
+function ControllerCtrl($scope){
+
+ //scope data which is made availble to the view.
+ $scope.data={
+ name:"Augustus"
+ }
+
+ //scope function, which can be run on view.
+ $scope.renderHtml=function(){
+ return "Hello World.";
+ }
+}
View
@@ -0,0 +1,21 @@
+<html>
+<head>
+ <title>Angular App Practice</title>
+ <link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
+ <style></style>
+</head>
+<body>
+ <div ng-app="">
+
+ <div ng-controller="ControllerCtrl">
+ <p>{{data.name}}</p>
+ <div>
+ {{renderHtml()}}
+ </div>
+ </div>
+ </div>
+<script src="lib/angular.js"></script>
+<script src="app.js"></script>
+</body>
+
+</html>
Oops, something went wrong.

0 comments on commit 0d3e631

Please sign in to comment.