{"id":224831,"date":"2014-06-01T19:58:03","date_gmt":"2014-06-01T15:58:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=224831"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=224831","title":{"rendered":"<span class=\"post_title\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b derby 0.6<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/166\/bf0\/d65\/166bf0d659927e25dc583ef2bb6390d0.png\" alt=\"image\" align=\"left\"\/><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0441\u0435\u0440\u0438\u044e (<a href=\"http:\/\/habrahabr.ru\/post\/221027\/\">\u0440\u0430\u0437<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/221703\/\">\u0434\u0432\u0430<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/222399\/\">\u0442\u0440\u0438<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/224031\/\">\u0447\u0435\u0442\u044b\u0440\u0435<\/a>) \u043f\u043e\u0441\u0442\u043e\u0432 \u043f\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u0444\u0443\u043b\u043b\u0441\u0442\u0435\u043a javascript \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 <a href=\"http:\/\/derbyjs.com\/\">derbyjs<\/a>. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0440\u0435\u0447\u044c \u0437\u0430\u0439\u0434\u0435\u0442 \u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445 (\u043d\u0435\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u0434\u0435\u0440\u0435\u043a\u0442\u0438\u0432 \u0432 \u0430\u043d\u0433\u0443\u043b\u044f\u0440\u0435) \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u0443 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0441\u0430, \u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041e\u0431\u0449\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445<\/h4>\n<p>  \u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u0434\u0435\u0440\u0431\u0438 0.6 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f derby-\u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u043e\u0439 view-\u0444\u0430\u0439\u043b (\u044f \u0434\u043b\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u044b\u0431\u0440\u0430\u043b \u0432\u0441\u0435 \u0442\u043e\u0442 \u0436\u0435 Todo-list \u2014 \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043b \u0438\u0437 TodoMVC):<\/p>\n<p>  index.html  <\/p>\n<pre><code class=\"html\">&lt;Body:&gt;    &lt;h1&gt;Todos:&lt;\/h1&gt;      &lt;view name=&quot;new-todo&quot;&gt;&lt;\/view&gt;      &lt;!-- \u0412\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b --&gt;    &lt;new-todo:&gt;     &lt;form&gt;     &lt;input type=&quot;text&quot;&gt;     &lt;button type=&quot;submit&quot;&gt;Add Todo&lt;\/button&gt;   &lt;\/form&gt;  <\/code><\/pre>\n<p>  \u0418 Body: \u0438 new-todo: \u0437\u0434\u0435\u0441\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c new-todo \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c? \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432 \u0434\u0435\u0440\u0431\u0438-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c:  <\/p>\n<pre><code class=\"javascript\">app.component('new-todo', function(){}); <\/code><\/pre>\n<p>  \u0422\u043e-\u0435\u0441\u0442\u044c \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u0443 \u043d\u0435\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u043d\u0435\u0433\u043e. \u041f\u0440\u043e\u0449\u0435 \u043d\u0435\u043a\u0443\u0434\u0430 (\u0445\u043e\u0442\u044f \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u043a\u0430 \u0435\u0449\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u0435\u043d). \u041d\u043e \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f? \u041a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 javascript \u043c\u043e\u0433\u0443\u0442 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441. \u041c\u0435\u0442\u043e\u0434\u044b \u043a\u043b\u0430\u0441\u0441\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f, \u044d\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f.<\/p>\n<p>  \u0427\u0443\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u2014 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c input \u043a \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f on-submit. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b, \u0435\u0441\u043b\u0438 \u0431\u044b \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0431\u044b\u043b\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442:  <\/p>\n<pre><code class=\"html\">&lt;new-todo:&gt;     &lt;form on-submit=&quot;addNewTodo()&quot;&gt;     &lt;input type=&quot;text&quot; value=&quot;{{_page.new-todo}}&quot;&gt;     &lt;button type=&quot;submit&quot;&gt;Add Todo&lt;\/button&gt;   &lt;\/form&gt; <\/code><\/pre>\n<pre><code class=\"javascript\">app.proto.addNewTodo = function(){   \/\/... } <\/code><\/pre>\n<p>  \u041a\u0430\u043a\u0438\u0435 \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438:<br \/>  1. \u0417\u0430\u0441\u043e\u0440\u044f\u0435\u0442\u0441\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 (_page)<br \/>  2. \u0424\u0443\u043d\u043a\u0446\u0438\u044f addNewTodo \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a app.proto \u2014 \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0437\u0434\u0435\u0441\u044c \u0431\u0443\u0434\u0435\u0442 \u043b\u0430\u043f\u0448\u0430.<\/p>\n<p>  \u041a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0435\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c new-todo \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u043c:  <\/p>\n<pre><code class=\"html\">&lt;new-todo:&gt;     &lt;form on-submit=&quot;addNewTodo()&quot;&gt;     &lt;input type=&quot;text&quot; value=&quot;{{todo}}&quot;&gt;     &lt;button type=&quot;submit&quot;&gt;Add Todo&lt;\/button&gt;   &lt;\/form&gt; <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">app.component('new-todo', NewTodo);    function NewTodo(){}  NewTodo.prototype.addNewTodo = function(todo){   \/\/ \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0437\u0434\u0435\u0441\u044c &quot;scoped&quot;   \/\/ \u043e\u043d\u0430 \u043d\u0435 \u0432\u0438\u0434\u0438\u0442 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439, \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435   var todo = this.model.get('todo');   \/\/... } <\/code><\/pre>\n<p>  \u0422\u0430\u043a, \u0447\u0442\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u043e\u0441\u044c? \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 new-todo: \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0432\u043e\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438, \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0432\u0438\u0434\u043d\u044b _page \u0438 \u0432\u0441\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438. \u0418, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u0443\u0442\u044c todo \u0437\u0434\u0435\u0441\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439, \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u043d \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d. \u0418\u043d\u0430\u043a\u0430\u043f\u0441\u0443\u043b\u044f\u0446\u0438\u044f \u2014 \u044d\u0442\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u043e. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a addNewTodo \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u043e\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 NewTodo \u043d\u0435 \u0437\u0430\u0441\u043e\u0440\u044f\u044f app \u0441\u0432\u043e\u0438\u043c\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438.<\/p>\n<p>  \u0418\u0442\u0430\u043a, derby-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u2014 \u044d\u0442\u043e ui-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432 \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430. \u0417\u0434\u0435\u0441\u044c \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0442\u043e, \u0438 \u044d\u0442\u043e \u0432\u0430\u0436\u043d\u043e, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043d\u0435 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445. \u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0435\u0449\u0435 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e url.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u0441\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u043a\u0443\u0445\u043d\u0438, \u043a\u0430\u043a\u043e\u0439 \u0436\u0435 \u043e\u043d\u0438 \u0438\u043c\u0435\u044e\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441? \u041a\u0430\u043a \u0432 \u043d\u0438\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b?<\/p>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0448\u0430\u0431\u043b\u043e\u043d \u0447\u0435\u0440\u0435\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0438 \u0432 \u0432\u0438\u0434\u0435 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e html-\u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 (\u043e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435). \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u043d\u0430 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0432 \u043d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 new-todo \u043a\u043b\u0430\u0441\u0441 \u0438 placeholder \u0434\u043b\u044f \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430, \u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 \u0441\u043e\u0431\u044b\u0442\u0438\u0435:<\/p>\n<p>  index.html  <\/p>\n<pre><code class=\"html\">&lt;Body:&gt;    &lt;h1&gt;Todos:&lt;\/h1&gt;      &lt;view      name=&quot;new-todo&quot;      pladeholder=&quot;Input new Todo&quot;      inputClass=&quot;big&quot;     on-addtodo=&quot;list.add()&quot;&gt;   &lt;\/view&gt;      &lt;view name=&quot;todos-list&quot; as=&quot;list&quot;&gt;&lt;\/view&gt;  &lt;new-todo:&gt;     &lt;form on-submit=&quot;addNewTodo()&quot;&gt;     &lt;input type=&quot;text&quot; value=&quot;{{todo}}&quot; placeholder=&quot;{{@pladeholder}}&quot; class=&quot;{{@inputClass}}&quot;&gt;     &lt;button type=&quot;submit&quot;&gt;Add Todo&lt;\/button&gt;   &lt;\/form&gt;  &lt;todos-list:&gt;   &lt;!-- \u0432\u044b\u0432\u043e\u0434 \u0441\u043f\u0438\u0441\u043a\u0430 \u0434\u0435\u043b --&gt; <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">app.component('new-todo', NewTodo);  app.component('todos-list:', TodosList);   function NewTodo(){}  NewTodo.prototype.addNewTodo = function(todo){   var todo = this.model.get('todo');   \/\/ \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043d\u043e \u0441\u043d\u0430\u0440\u0443\u0436\u0438   \/\/ (\u0432 \u043c\u0435\u0441\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430)   this.emit('newtodo', todo); }  function TodosList(){};  TodosList.prototype.add = function(todo){   \/\/ \u0412\u043e\u0442 \u0442\u0430\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043f\u043e\u043f\u0430\u043b\u043e \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430    \/\/ \u0432 \u0434\u0440\u0443\u0433\u043e\u0439. \u0412\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0438\u043c\u0435\u043d\u043d\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442   \/\/ \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043d\u0438\u043c\u0430\u0442\u044c\u0441\u044f   \/\/ \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 }  <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0435\u0433\u043e \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c. <\/p>\n<p>  \u041d\u0430\u0448 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 new-todo \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 2 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: placeholder \u0438 inputClass \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u00abaddtodo\u00bb, \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u043c\u044b \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 todos-list, \u0442\u0430\u043c \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 TodosList.prototype.add. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 todos-list \u043c\u044b \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u043b\u0438 \u0435\u043c\u0443 \u0430\u043b\u0438\u0430\u0441 list, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e as. \u0418\u043c\u0435\u043d\u043d\u043e \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0435 on-addtodo \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c list.add().<\/p>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c new-todo \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u044c\u044e, \u0441 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 todos-list \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u043f\u0438\u0441\u043e\u043a todos. \u041e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u0442\u0440\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0442\u043e\u0438\u0442 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443.<\/p>\n<h4> \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/h4>\n<p>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0434\u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0438\u043c \u043f\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0443 \u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0438\u043d\u043e\u0435, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u044f \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445). <\/p>\n<p>  \u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u044b (\u043a\u0430\u043a \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b) \u0432 html \u0444\u0430\u0439\u043b\u0430\u0445 derby \u043f\u043e\u0434\u043e\u0431\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c, \u0443 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f, \u0433\u0434\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u0441\u0430\u043c \u0448\u0430\u0431\u043b\u043e\u043d. \u0410 \u0442\u0430\u043a \u0436\u0435 \u0435\u0441\u0442\u044c (\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u044b\u0439) \u0432\u044b\u0437\u043e\u0432 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u0437 \u0434\u0440\u0443\u0433\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432.<\/p>\n<h5># \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 (\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430) \u0438 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 @content<\/h5>\n<p>  <\/p>\n<pre><code class=\"html\">&lt;name: ([element=&quot;element&quot;] [attributes=&quot;attributes&quot;] [arrays=&quot;arrays&quot;])&gt; <\/code><\/pre>\n<p>  \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b element, attributes \u0438 array \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438. \u0427\u0442\u043e \u043e\u043d\u0438 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442? \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445:<\/p>\n<h6>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 element<\/h6>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0438 \u0432\u044b\u0437\u043e\u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<br \/>  (\u041f\u043e\u043a\u0430 \u043d\u0435 \u043e\u0431\u0440)<\/p>\n<pre><code class=\"html\">&lt;!-- \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 --&gt; &lt;nav-link:&gt;   &lt;!-- \u0432 $render.url \u043b\u0435\u0436\u0438\u0442 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 url \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b --&gt;   &lt;li class=&quot;{{if $render.url === @href}}active{{\/}}&quot;&gt;     &lt;a href=&quot;{{@href}}&quot;&gt;{{@caption}}&lt;\/a&gt;   &lt;\/li&gt;    &lt;!-- \u0432\u044b\u0437\u043e\u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 Body: --&gt; &lt;view name=&quot;nav-link&quot; href=&quot;\/&quot; caption=&quot;Home&quot;&gt;&lt;\/view&gt; <\/code><\/pre>\n<p>  \u0414\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0443\u0434\u043e\u0431\u043d\u043e. \u0418\u043d\u043e\u0433\u0434\u0430 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u043d\u0435 \u0447\u0435\u0440\u0435\u0437 \u0442\u0435\u0433 view \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c, \u0430 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0438\u043c\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d\u0438 \u0442\u0435\u0433\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u043d\u0443\u0436\u0435\u043d \u0430\u0442\u0440\u0438\u0431\u0443\u0442 element.<\/p>\n<pre><code class=\"html\">&lt;!-- \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u0443\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d, \u0434\u0430\u0432\u0430\u044f \u0435\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a \u0442\u0435\u0433 nav-link --&gt; &lt;nav-link: element=&quot;nav-link&quot;&gt;   &lt;li class=&quot;{{if $render.url === @href}}active{{\/}}&quot;&gt;     &lt;a href=&quot;{{@href}}&quot;&gt;{{@caption}}&lt;\/a&gt;   &lt;\/li&gt;    &lt;!-- \u0432\u044b\u0437\u043e\u0432 nav-link \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 Body: --&gt; &lt;nav-link href=&quot;\/&quot; caption=&quot;Home&quot;&gt;&lt;\/nav-link&gt;  <\/code><\/pre>\n<p>  \u0410 \u043c\u043e\u0436\u043d\u043e \u0434\u0430\u0436\u0435 \u0442\u0430\u043a  <\/p>\n<pre><code class=\"html\">&lt;nav-link href=&quot;\/&quot; caption=&quot;Home&quot;\/&gt;  <\/code><\/pre>\n<p>  \u0412 \u0442\u0430\u043a\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435, \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u0447\u0430\u0441\u0442\u044c \u0442\u0435\u0433\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0442\u0435\u0433\u0430 \u0443 \u043d\u0430\u0441 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442. \u0410 \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435?<\/p>\n<h6>\u041d\u0435\u044f\u0432\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 content<\/h6>\n<p>  \u041f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0435\u0433 view, \u043b\u0438\u0431\u043e \u0442\u0435\u0433 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u043c element \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"html\">&lt;!-- \u0442\u0430\u043a --&gt; &lt;view name=&quot;nav-link&quot; href=&quot;\/&quot; caption=&quot;Home&quot;&gt;&lt;\/view&gt; &lt;!-- \u043b\u0438\u0431\u043e \u0442\u0430\u043a --&gt; &lt;nav-link name=&quot;nav-link&quot; href=&quot;\/&quot; caption=&quot;Home&quot;&gt;&lt;\/nav-link&gt;  &lt;!-- \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 --&gt; &lt;nav-link: element=&quot;nav-link&quot;&gt;   &lt;li class=&quot;{{if $render.url === @href}}active{{\/}}&quot;&gt;     &lt;a href=&quot;{{@href}}&quot;&gt;{{@caption}}&lt;\/a&gt;   &lt;\/li&gt;   <\/code><\/pre>\n<p>  \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435, \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0438 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u0442\u0435\u0433\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0435-\u043b\u0438\u0431\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0435\u043a\u0441\u0442 \u0438\u043b\u0438 \u0436\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 html. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d \u0432\u043d\u0443\u0442\u0440\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043d\u0435\u044f\u0432\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c @content. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0437\u0430\u043c\u0435\u043d\u0438\u043c caption, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f @content:<\/p>\n<pre><code class=\"html\">&lt;!-- \u0442\u0430\u043a --&gt; &lt;view name=&quot;nav-link&quot; href=&quot;\/&quot;&gt;Home&lt;\/view&gt; &lt;!-- \u043b\u0438\u0431\u043e \u0442\u0430\u043a --&gt; &lt;nav-link name=&quot;nav-link&quot; href=&quot;\/&quot;&gt;Home&lt;\/nav-link&gt; &lt;!-- \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0442\u0430\u043a --&gt; &lt;nav-link name=&quot;nav-link&quot; href=&quot;\/&quot;&gt;   &lt;span class=&quot;img image-home&quot;&gt;     Home   &lt;\/span&gt; &lt;\/nav-link&gt;  &lt;!-- \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 --&gt; &lt;nav-link: element=&quot;nav-link&quot;&gt;   &lt;li class=&quot;{{if $render.url === @href}}active{{\/}}&quot;&gt;     &lt;a href=&quot;{{@href}}&quot;&gt;{{@content}}&lt;\/a&gt;   &lt;\/li&gt;   <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0442\u044c \u043a\u043e\u0434 \u0432\u0435\u0440\u0445\u043d\u0435\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f.<\/p>\n<p>  \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b attributes \u0438 arrays \u0438\u043c\u0435\u044e\u0442 \u043a \u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0435.<\/p>\n<h6>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 attributes<\/h6>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0433\u0434\u0430 \u0431\u043b\u043e\u043a html-\u043a\u043e\u0434\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u0448\u0430\u0431\u043b\u043e\u043d, \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u0435\u0434\u0438\u043d\u044b\u043c \u0431\u043b\u043e\u043a\u043e\u043c \u0431\u044b\u0442\u044c \u0432\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0435\u0441\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0432\u0438\u0434\u0436\u0435\u0442, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 header, footer \u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442. \u0412\u044b\u0437\u043e\u0432 \u0435\u0433\u043e \u043c\u043e\u0433 \u0431\u044b \u0431\u044b\u0442\u044c \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"html\">&lt;widget&gt;   &lt;header&gt;&lt;-- \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 --&gt;&lt;\/header&gt;   &lt;footer&gt;&lt;-- \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 --&gt;&lt;\/footer&gt;   &lt;body&gt;&lt;-- \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 --&gt;&lt;\/body&gt; &lt;\/widget&gt; <\/code><\/pre>\n<p>  \u0410 \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 widget \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430, \u043a\u0443\u0434\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 3 \u0431\u043b\u043e\u043a\u0430, \u0432 \u0432\u0438\u0434\u0435 <a href=\"http:\/\/habrahabr.ru\/users\/header\/\" class=\"user_link\">header<\/a>, <a href=\"http:\/\/habrahabr.ru\/users\/footer\/\" class=\"user_link\">footer<\/a> \u0438 <a href=\"http:\/\/habrahabr.ru\/users\/body\/\" class=\"user_link\">body<\/a><\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438 \u043d\u0443\u0436\u0435\u043d attributes:  <\/p>\n<pre><code class=\"html\">&lt;widget: attributes=&quot;header footer body&quot;&gt;    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;      {{@header}}    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;      {{@body}}    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;      {{@footer}}    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt; <\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u043c\u0435\u0441\u0442\u043e body, \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c content, \u0432\u0435\u0434\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043e \u0432 attributes (\u043d\u0443 \u0438, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0435\u0449\u0435 \u0432 arrays) \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 content:<\/p>\n<pre><code class=\"html\">&lt;Body:&gt;   &lt;widget&gt;     &lt;h1&gt;Hello&lt;h1&gt;     &lt;header&gt;&lt;-- \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 --&gt;&lt;\/header&gt;     &lt;footer&gt;&lt;-- \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 --&gt;&lt;\/footer&gt;     &lt;p&gt;text&lt;\/text&gt;   &lt;\/widget&gt;  &lt;widget: attributes=&quot;header footer&quot;&gt;    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;      {{@header}}    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;            {{@content}}  &lt;!-- \u0441\u044e\u0434\u0430 \u043f\u043e\u043f\u0430\u0434\u0443\u0442 \u0442\u0435\u0433\u0438 h1 \u0438 p --&gt;          &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;      {{@footer}}    &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt; <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u0432\u0441\u0435 \u0447\u0442\u043e \u043c\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043b\u0438 \u0432 attributes \u0434\u043e\u043b\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u043c \u0431\u043b\u043e\u043a\u0435 (\u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u043c \u0432 \u0448\u0430\u0431\u043b\u043e\u043d) \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \u0410 \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435. \u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0433\u043e?<\/p>\n<h6>\u0410\u0442\u0440\u0438\u0431\u0443\u0442 arrays<\/h6>\n<p>  \u0414\u0435\u043b\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u0432\u044b\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u043d\u0430\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"html\">&lt;dropdown&gt;   &lt;option&gt;\u043f\u0435\u0440\u0432\u044b\u0439&lt;\/option&gt;   &lt;option class=&quot;bold&quot;&gt;\u0432\u0442\u043e\u0440\u043e\u0439&lt;\/option&gt;   &lt;option&gt;\u0442\u0440\u0435\u0442\u0438\u0439&lt;\/option&gt; &lt;\/dropdown&gt;   <\/code><\/pre>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 dropdown \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0439, \u0437\u043d\u0430\u0447\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e content \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442. \u0422\u0430\u043a \u0436\u0435 \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 attributes, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 option \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043b\u0443\u0447\u0430\u044f \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 arrays:<\/p>\n<pre><code class=\"html\">&lt;dropdown: arrays=&quot;option\/options&quot;&gt;   &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;   {{each @options}}     &lt;li class=&quot;{{this.class}}&quot;&gt;       {{this.content}}     &lt;\/li&gt;   {{}}   &lt;!-- \u0441\u043b\u043e\u0436\u043d\u0430\u044f \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 --&gt;    <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u044b, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438 \u043f\u0440\u0438 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f &#8216;arrays=\u00aboption\/options\u00bb&#8217; \u2014 \u0437\u0434\u0435\u0441\u044c \u0434\u0432\u0430 \u0438\u043c\u0435\u043d\u0438:<\/p>\n<p>  1. option \u2014 \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f html-\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 dropdown-\u0430 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435<br \/>  2. options \u2014 \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430, \u0441\u0430\u043c\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043e\u0431\u044a\u0435\u043a\u0442\u0430\u043c\u0438, \u0433\u0434\u0435 \u0432\u0441\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b option-\u0430 \u0441\u0442\u0430\u043d\u0443\u0442 \u043f\u043e\u043b\u044f\u043c\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0430 \u0435\u0433\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435, \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043b\u0435\u043c content.<\/p>\n<h4> \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/h4>\n<p>  \u041a\u0430\u043a \u043c\u044b \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0448\u0430\u0431\u043b\u043e\u043d \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u0435\u0441\u043b\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440.<\/p>\n<pre><code class=\"html\">&lt;new-todo:&gt;     &lt;form on-submit=&quot;addNewTodo()&quot;&gt;     &lt;input type=&quot;text&quot; value=&quot;{{todo}}&quot;&gt;     &lt;button type=&quot;submit&quot;&gt;Add Todo&lt;\/button&gt;   &lt;\/form&gt; <\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"javascript\">app.component('new-todo', NewTodo);    function NewTodo(){}  NewTodo.prototype.addNewTodo = function(todo){    var todo = this.model.get('todo');   \/\/... } <\/code><\/pre>\n<p>  \u0423 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u044b \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0436\u0438\u0437\u043d\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u2014 \u044d\u0442\u043e create, init \u0438 destroy.<\/p>\n<h5># init<\/h5>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f init \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435, \u0442\u0430\u043a \u0438 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, \u0434\u043e \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u0415\u0435 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0437\u0430\u0434\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e-\u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 (ref).<\/p>\n<pre><code class=\"javascript\">\/\/ \u0432\u0437\u044f\u0442\u043e \u0438\u0437 https:\/\/github.com\/codeparty\/d-d3-barchart\/blob\/master\/index.js  function BarChart() {}  BarChart.prototype.init = function() {   var model = this.model;   model.setNull(&quot;data&quot;, []);   model.setNull(&quot;width&quot;, 200);   model.setNull(&quot;height&quot;, 100);    \/\/ ... }; <\/code><\/pre>\n<h5># create<\/h5>\n<p>  \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043f\u043e\u0441\u043b\u0435 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u043d\u0433\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430. \u041d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u043e\u0434\u043f\u0438\u0441\u043e\u043a \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0438 \u0442.\u0434.  <\/p>\n<pre><code class=\"javascript\">BarChart.prototype.create = function() {   var model = this.model;   var that = this;    \/\/ changes in values inside the array   model.on(&quot;all&quot;, &quot;data**&quot;, function() {     \/\/console.log(&quot;event data:&quot;, arguments);     that.transform()     that.draw()   });   that.draw(); }; <\/code><\/pre>\n<h5># destroy<\/h5>\n<p>  \u0412\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u043d\u0443\u0436\u043d\u0430 \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e\u0449\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439: \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438, \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<h4> \u0427\u0442\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 this \u0432 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430?<\/h4>\n<p>  \u0412\u043e \u0432\u0441\u0435\u0445 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432 this \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b: model, app, dom (\u043a\u0440\u043e\u043c\u0435 init), \u0432\u0441\u0435 \u0430\u043b\u0438\u0430\u0441\u044b \u043a dom-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c, \u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, parent-\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442-\u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c, \u043d\u0443 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e \u0432\u0441\u0435 \u0447\u0442\u043e \u043c\u044b \u0441\u0430\u043c\u0438 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0432 prototype \u0444\u0443\u043d\u043a\u0446\u0438\u0438-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.<\/p>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c \u0437\u0434\u0435\u0441\u044c \u0441 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u044c\u044e \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438. \u0422\u043e-\u0435\u0441\u0442\u044c \u0447\u0435\u0440\u0435\u0437 this.model \u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0432\u0438\u0434\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430, \u0435\u0441\u043b\u0438 \u0436\u0435 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043a \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u0438 derby, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 this.model.root, \u043b\u0438\u0431\u043e this.app.model.<\/p>\n<p>  C app \u0432\u0441\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u044d\u0442\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 derby-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"javascript\">MyComponent.prototype.back = function(){   this.app.history.back(); } <\/code><\/pre>\n<p>  \u0427\u0435\u0440\u0435\u0437 dom \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043d\u0430 DOM-\u0441\u043e\u0431\u044b\u0442\u0438\u044f (\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 on, once, removeListener), \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"javascript\">\/\/ \u0432\u0437\u044f\u0442\u043e https:\/\/github.com\/codeparty\/d-bootstrap\/blob\/master\/dropdown\/index.js Dropdown.prototype.create = function(model, dom) {   \/\/ Close on click outside of the dropdown   var dropdown = this;   dom.on('click', function(e) {     if (dropdown.toggleButton.contains(e.target)) return;     if (dropdown.menu.contains(e.target)) return;     model.set('open', false);   }); }; <\/code><\/pre>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432\u0432\u0438\u0434\u0443, \u0447\u0442\u043e this.toggleButton \u0438 this.menu \u2014 \u044d\u0442\u043e \u0430\u043b\u0438\u0430\u0441\u044b \u0434\u043b\u044f DOM-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0447\u0435\u0440\u0435\u0437 as:<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0437\u0434\u0435\u0441\u044c: <a href=\"https:\/\/github.com\/codeparty\/d-bootstrap\/blob\/master\/dropdown\/index.html#L4-L11\">github.com\/codeparty\/d-bootstrap\/blob\/master\/dropdown\/index.html#L4-L11<\/a><\/p>\n<p>  \u0412\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 dom: on, once, removeListeners \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: type, [target], listener, [useCapture]. Target \u2014 \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f(\u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0441\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f) \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a, \u0435\u0441\u043b\u0438 target \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d, \u043e\u043d \u0440\u0430\u0432\u0435\u043d document. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 3 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c \u043e\u0431\u044b\u0447\u043d\u043e\u0439 addEventListener(type, listener[, useCapture])<\/p>\n<p>  \u0410\u043b\u0438\u0430\u0441\u044b \u043d\u0430 dom-\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432a as:<\/p>\n<pre><code class=\"html\">&lt;main-menu:&gt;   &lt;div as=&quot;menu&quot;&gt;     &lt;!-- ... --&gt;   &lt;\/div&gt; <\/code><\/pre>\n<pre><code class=\"javascript\">MainMenu.prototype.hide = function(){   \/\/ \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a   $(this.menu).hide(); } <\/code><\/pre>\n<h4> \u0412\u044b\u043d\u043e\u0441 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c<\/h4>\n<p>  \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 \u0431\u044b\u043b\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e html-\u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0443\u0436\u043d\u043e (\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0443\u0436\u043d\u043e) \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u043e\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p>  \u0414\u043b\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043f\u0430\u043f\u043a\u0430, \u0432 \u043d\u0435\u0435 \u043a\u043b\u0430\u0434\u0443\u0442\u0441\u044f js, html, \u0441ss \u0444\u0430\u0439\u043b\u044b (\u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0441\u0442\u0438\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c), \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 app.component \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f-\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440. \u041a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<p>  app.component(require(&#8216;..\/components\/dropdown&#8217;));<\/p>\n<p>  \u0417\u0430\u043c\u0435\u0442\u044c\u0442\u0435, \u0440\u0430\u043d\u044c\u0448\u0435, \u043a\u043e\u0433\u0434\u0430 \u0448\u0430\u0431\u043b\u043e\u043d \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u0443\u0436\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 html-\u0444\u0430\u0439\u043b\u0430\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0431\u044b\u043b\u0430 \u0434\u0440\u0443\u0433\u043e\u0439:<\/p>\n<p>  app.component(&#8216;dropdown&#8217;, Dropdown);<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  tabs\/index.js  <\/p>\n<pre><code class=\"javascript\">module.exports = Tabs; function Tabs() {} Tabs.prototype.view = __dirname;  Tabs.prototype.init = function(model) {   model.setNull('selectedIndex', 0); };  Tabs.prototype.select = function(index) {   this.model.set('selectedIndex', index); }; <\/code><\/pre>\n<p>  tabs\/index.html  <\/p>\n<pre><code class=\"html\">&lt;index: arrays=&quot;pane\/panes&quot; element=&quot;tabs&quot;&gt;   &lt;ul class=&quot;nav nav-tabs&quot;&gt;     {{each @panes as #pane, #i}}       &lt;li class=&quot;{{if selectedIndex === #i}}active{{\/if}}&quot;&gt;         &lt;a on-click=&quot;select(#i)&quot;&gt;{{#pane.title}}&lt;\/a&gt;       &lt;\/li&gt;     {{\/each}}   &lt;\/ul&gt;   &lt;div class=&quot;tab-content&quot;&gt;     {{each @panes as #pane, #i}}       &lt;div class=&quot;tab-pane{{if selectedIndex === #i}} active{{\/if}}&quot;&gt;         {{#pane.content}}       &lt;\/div&gt;     {{\/each}}   &lt;\/div&gt; <\/code><\/pre>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0443:  <\/p>\n<pre><code class=\"javascript\">Tabs.prototype.view = __dirname; <\/code><\/pre>\n<p>  \u041e\u0442\u0441\u044e\u0434\u0430 derby \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0438\u043c\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 (\u043e\u043d\u043e \u0436\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u0430\u043c\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f &#8216;index:&#8217;). \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u2014 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u043f\u0443\u0442\u0438. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c _dirname \u0443 \u043d\u0430\u0441 \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0430\u0432\u0435\u043d &#8216;\/home\/zag2art\/work\/project\/src\/components\/tabs&#8217;, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0447\u0442\u043e \u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u043a \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0447\u0435\u0440\u0435\u0437 &#8216;tabs&#8217;, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"html\">&lt;Body:&gt;   &lt;tabs selected-index=&quot;{{widgets.data.currentTab}}&quot;&gt;     &lt;pane title=&quot;One&quot;&gt;       Stuff'n     &lt;\/pane&gt;     &lt;pane title=&quot;Two&quot;&gt;       More stuff     &lt;\/pane&gt;   &lt;\/tabs&gt; <\/code><\/pre>\n<p>  \u0421\u0430\u043c\u043e \u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430 \u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u0438\u043c:  <\/p>\n<pre><code class=\"javascript\">app.component(require('..\/components\/tabs')); <\/code><\/pre>\n<p>  \u041e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u043e\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 npm, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <a href=\"https:\/\/www.npmjs.org\/package\/d-d3-barchart\">www.npmjs.org\/package\/d-d3-barchart<\/a>    \t\t\t\t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u041d\u0443 \u043a\u0430\u043a, \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u044e?<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"224831\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"11279\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv56837\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"56837\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv56837\">\u0434\u0430<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv56839\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"56839\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv56839\">\u043d\u0435\u0442<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"https:\/\/habrahabr.ru\/auth\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<\/p><\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/224831\/\"> http:\/\/habrahabr.ru\/post\/224831\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/166\/bf0\/d65\/166bf0d659927e25dc583ef2bb6390d0.png\" alt=\"image\" align=\"left\"\/><br \/>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044e \u0441\u0435\u0440\u0438\u044e (<a href=\"http:\/\/habrahabr.ru\/post\/221027\/\">\u0440\u0430\u0437<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/221703\/\">\u0434\u0432\u0430<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/222399\/\">\u0442\u0440\u0438<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/224031\/\">\u0447\u0435\u0442\u044b\u0440\u0435<\/a>) \u043f\u043e\u0441\u0442\u043e\u0432 \u043f\u043e \u0440\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c\u0443 \u0444\u0443\u043b\u043b\u0441\u0442\u0435\u043a javascript \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 <a href=\"http:\/\/derbyjs.com\/\">derbyjs<\/a>. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0440\u0435\u0447\u044c \u0437\u0430\u0439\u0434\u0435\u0442 \u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445 (\u043d\u0435\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u043e\u0433 \u0434\u0435\u0440\u0435\u043a\u0442\u0438\u0432 \u0432 \u0430\u043d\u0433\u0443\u043b\u044f\u0440\u0435) \u2014 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c\u0443 \u0441\u043f\u043e\u0441\u043e\u0431\u0443 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0441\u0430, \u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-224831","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/224831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=224831"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/224831\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=224831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=224831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=224831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}