<html>
<head> <!-- www.w3tr.com -->
<title>angular.identity Örnek</title>
</head>
<body>
<div ng-app="app" ng-controller="AppCtrl">
{{ title }}
</div>
</body>
</html>
var app = angular.module("app",[]);
app.factory("game", function () {
return {
title: "StarCraft"
};
});
angular.injector(["app"]).invoke(function (game) {
document.write(game.title);
});
app.controller("AppCtrl", function ($scope, game) {
$scope.title = game.title;
});
This Pen doesn't use any external CSS resources.