Skip to content

Instantly share code, notes, and snippets.

@witchpou
Last active December 11, 2016 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save witchpou/f2ce6297ff309c428669e20f8e498b1c to your computer and use it in GitHub Desktop.
Save witchpou/f2ce6297ff309c428669e20f8e498b1c to your computer and use it in GitHub Desktop.
simple angularJS example - created by witchpou - https://repl.it/EnBN/9
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="index.css" rel="stylesheet" type="text/css" />
</head>
<body ng-app="myApp">
<div class="main" ng-controller="MainController">
<div class="container">
<h1>{{ title }}</h1>
<ul>
<li>strength: {{ skills.strength.value }}</li>
</ul>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script src="index.js"></script>
</body>
</html>
var app = angular.module("myApp", []);
app.controller('MainController', ['$scope', function($scope) {
$scope.title = 'Score';
$scope.skills = {
strength : { value : 2, power : 1 }
};
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment