Last active
December 11, 2016 14:40
-
-
Save witchpou/f2ce6297ff309c428669e20f8e498b1c to your computer and use it in GitHub Desktop.
simple angularJS example - created by witchpou - https://repl.it/EnBN/9
This file contains 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
Empty file |
This file contains 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> | |
<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> |
This file contains 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
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