Created
November 22, 2015 19:28
-
-
Save gbechtold/fa41e08ed9ac6d44e954 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- 1. First: you got to register your app --> | |
<html ng-app="MicroApp"> | |
<head> | |
<!-- 2. First: Load angular --> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.5/angular.min.js"></script> | |
<link rel="stylesheet" href="style.css" /> | |
<script> | |
/* 3. Initialize a new App */ | |
var app = angular.module('MicroApp', []); | |
/* 6. Create a Controller to do the work */ | |
app.controller('FristCtrl', function($scope) {}); | |
</script> | |
</head> | |
<body> | |
<!-- 4. Use this first expression to validate if Angular works --> | |
{{ 1 + 1 }} | |
<h1>welcome</h1> | |
<!-- 5. Create your first Controller --> | |
<div ng-controller="FristCtrl"> | |
<!-- 7. Bind a textfield to a model to get and send text --> | |
<input ng-model="textone"> {{ textone }} | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment