JSFiddle - React, Tailwind, and code Playground

by Evgeniy Lukovsky

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.1/angular-cookies.min.js"></script>
<div ng-app="testapp">
    <div ng-controller="controller">
        <input type="text" placeholder="something" ng-model="query"/>
        <ul>
            <li ng-repeat="thing in things | filter:query">
              {{thing}}
            </li>
         </ul>
        <input id="cookie" ng-model="cookie" type="text"/>
        <input type="button" ng-click="btn"/>
    </div>
</div>

JavaScript

'use strict';

var module = angular.module('testapp', ['ngCookies']);

/* Controllers */

function controller($scope, $cookies) {
    $scope.cookie = document.cookie;
    
  $scope.things = [
    "Пиздец",
    "Путин",
     "Срань",
      "хрень"
  ];
    $scope.btn = function(){
        document.cookie = 'testCookie=fuck;';
        $scope.cookie = $cookies['testCookie'];
    }
}