what's the $cookies on AngularJS in Angular 4/5?

for example in AngularJS 

```
let app = angular.module('myApp', ['ngCookies']);
app.controller('MainController', MainController);
MainController.$inject = ['$scope', '$cookies'];
function MainController($scope, $cookies){
  $cookies.put('msg', 'Hello World');
  $scope.msgFromCookie= $cookies.get('msg');
}

```