Created
June 3, 2014 23:25
-
-
Save renatocantarino/15f4771241bb9e62d82d to your computer and use it in GitHub Desktop.
Constant
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> | |
<html ng-app="app"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript"> | |
app = angular.module("app", []); | |
app.controller('MainCtrl', function($scope, conf) { | |
$scope.conf = conf; | |
}); | |
app.constant('conf', { | |
Nome: 'Renato', | |
SobreNome: "Cantarino" | |
}); | |
</script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body ng-controller="MainCtrl"> | |
Nome: {{conf.Nome}} | |
<br /> | |
SobreNome: {{conf.SobreNome}} | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment