<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="angular.js@1.5.x" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.11/angular.min.js" data-semver="1.5.11"></script>
<script src="script.js"></script>
</head>
<body ng-controller="MainCtrl">
<p>Hello {{name}}!</p>
</body>
</html>
// Code goes here
const app = angular.module('plunker', []);
app.service('servicio1', function(){
this.s1 = () => 'servicio uno'
});
app.service('servicio2', ['servicio1',function(servicio1){
this.s2 = () => 'servicio dos ' + servicio1.s1();
}]);
app.controller('MainCtrl',
[
'$scope','servicio2',
($scope,servicio2) => $scope.name = 'World '+ servicio2.s2()
]);
/* Styles go here */