{"id":266247,"date":"2015-09-23T16:23:06","date_gmt":"2015-09-23T12:23:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=266247"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=266247","title":{"rendered":"\u0410\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d \u043d\u0430 AngularJS \u0438 Bootstrap"},"content":{"rendered":"<p>       \u0410\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u00ab\u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u00bb \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 (\u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u0441\u0442\u0438\u043b\u0435\u0439) \u0431\u043b\u043e\u043a\u0443 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 HTML.<\/p>\n<p>  \u0411\u043b\u043e\u043a \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0434\u0432\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u2014 \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0438:<\/p>\n<pre><code class=\"html\">&lt;ul ngc-accordion&gt;     &lt;li ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04351&quot; template=&quot;template.html&quot;&gt;... &lt;\/li&gt;     &lt;li ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04352&quot; template=&quot;template.html&quot;&gt;... &lt;\/li&gt; &lt;\/ul&gt;     <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"html\">&lt;div ngc-accordion&gt;     &lt;div ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04351&quot; template=&quot;template.html&quot;&gt;... &lt;\/div&gt;     &lt;div ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04352&quot; template=&quot;template.html&quot;&gt;... &lt;\/div&gt; &lt;\/div&gt;     <\/code><\/pre>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b6b\/57d\/743\/b6b57d743302421885852ee0f08ee952.png\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0416\u0438\u0432\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 <strong><a href=\"http:\/\/js4lcaeq.github.io\/v1\/v1\/FullFeaturedSample\/index.html\">\u0442\u0443\u0442<\/a><\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 \u0434\u0432\u0443\u0445 AngularJS \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430\u0445 <strong>ngc-accordion<\/strong> \u0438 <strong>ngc-accordion-tab<\/strong>.<br \/>  \u041a \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0443 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 <strong>ngc-accordion-tab<\/strong> \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d. \u041a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u00ab\u043a\u043b\u0438\u043a\u043e\u0432\u00bb. \u041a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0448\u0438\u0440\u0438\u043d\u044b.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u0430 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c Bootstrap`\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u041e\u0431\u0449\u0430\u044f \u0440\u0430\u043c\u043a\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0440\u0438\u0441\u0443\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u00abpanel panel-default\u00bb, \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a-\u043a\u043d\u043e\u043f\u043a\u0430 \u00abbtn btn-default\u00bb \u0438 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u00abaccordion-tab-body\u00bb, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0432\u043a\u043b\u0430\u0434\u043a\u0438, \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u043e\u0435 \u043f\u0430\u0440\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0440\u0438\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u044f\u043a\u0438\u0445 \u00ab\u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0441\u0442\u0435\u0439\u00bb.<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0434\u043b\u044f \u0430\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u0430 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b:<\/p>\n<pre><code class=\"html\">    &lt;div class=&quot;accordion-tab-box panel panel-default&quot; ng-class=&quot;{'panel-primary': t.opened, 'panel-default': !t.opened}&quot;&gt;         &lt;div class=&quot;accordion-tab-header btn btn-default&quot; style=&quot;padding-top: {{a.height - 30}}px;&quot; ng-class=&quot;{'btn-primary': t.opened, 'btn-default': !t.opened}&quot;&gt;             &lt;div class=&quot;accordion-tab-header-text&quot;&gt;&lt;strong&gt;{{t.name}}&lt;\/strong&gt; {{a.index}}\/{{t.index}}&lt;\/div&gt;         &lt;\/div&gt;         &lt;div class=&quot;accordion-tab-body&quot;&gt;             &lt;div style=&quot;width: {{t.bodyWidth}}px;&quot;&gt;                 &lt;div class=&quot;panel-body&quot;&gt;                     &lt;div class=&quot;accordion-tab-scroll&quot; style=&quot;overflow:auto; height: {{a.height-30}}px;&quot; ng-transclude&gt;&lt;\/div&gt;                 &lt;\/div&gt;             &lt;\/div&gt;         &lt;\/div&gt;     &lt;\/div&gt;     <\/code><\/pre>\n<p>  \u041e\u0431\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <strong>ngc-accordion<\/strong> \u0438 <strong>ngc-accordion-tab<\/strong> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 scope. \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 <strong>t<\/strong> \u0438 \u0432\u0441\u0435\u0433\u043e \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u0430 <strong>a<\/strong>.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>t.bodyWidth<\/strong> \u2014 \u0448\u0438\u0440\u0438\u043d\u0430 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0444\u0438\u043a\u0441\u0430\u0446\u0438\u0438 \u0448\u0438\u0440\u0438\u043d\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0430 \u00ab\u0432\u044b\u043f\u043e\u043b\u0437\u0430\u043d\u0438\u044f\u00bb \u043e\u0434\u043d\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0438\u0437 \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u043e\u0439.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u043e\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <strong>a.height<\/strong> \u2014 \u0432\u044b\u0441\u043e\u0442\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0437\u0438\u0446\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0438.<\/p>\n<p>  \u0422\u0435\u043a\u0441\u0442 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043a\u043b\u0430\u0434\u043a\u0438 \u0431\u0435\u0440\u0435\u0442\u0441\u044f \u0438\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <strong>ngc-accordion-tab<\/strong>, \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 <strong>t.name<\/strong>. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 <strong>ngc-accordion<\/strong> \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 <strong>a.name<\/strong>.<\/p>\n<p>  \u0412 \u0448\u0430\u0431\u043b\u043e\u043d\u0430\u0445 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u0430 \u0441 \u0430\u0432\u0442\u043e\u0432\u044b\u0441\u043e\u0442\u043e\u0439 \u041d\u0415 \u0421\u041b\u0415\u0414\u0423\u0415\u0422 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c <strong>t.height<\/strong> \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 <strong>accordion-tab-body<\/strong> \u2014 \u044d\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044e \u0432\u044b\u0441\u043e\u0442\u044b \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u0430 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0448\u0438\u0440\u0438\u043d\u044b \u043e\u043a\u043d\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430.<\/p>\n<p>  \u0420\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0448\u0430\u0431\u043b\u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438 \u043b\u044e\u0431\u044b\u043c \u0434\u0440\u0443\u0433\u0438\u043c, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u043a\u043b\u0438\u043a\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438 \u0430\u043d\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 <strong>accordion-tab-header<\/strong> \u0438 <strong>accordion-tab-body<\/strong>.<\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u043a\u043e\u0434 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0438, \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u043c\u0443 <strong><a href=\"http:\/\/js4lcaeq.github.io\/v1\/v1\/SimpleSample\/index.html\">\u043f\u0440\u0438\u043c\u0435\u0440\u0443<\/a><\/strong>:<\/p>\n<pre><code class=\"html\">    &lt;!DOCTYPE HTML&gt;     &lt;html lang=&quot;en&quot; ng-controller=&quot;MainCtrl&quot;&gt;     &lt;head&gt;         &lt;meta charset=&quot;utf-8&quot;&gt;         &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;         &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;         &lt;title&gt;Accordion samples&lt;\/title&gt;         &lt;link href=&quot;https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.4\/css\/bootstrap.min.css&quot; rel=&quot;stylesheet&quot; \/&gt;          &lt;link href=&quot;..\/accordion.css&quot; rel=&quot;stylesheet&quot; \/&gt;         &lt;!--[if lt IE 9]&gt;&lt;script src=&quot;..\/..\/assets\/js\/ie8-responsive-file-warning.js&quot;&gt;&lt;\/script&gt;&lt;![endif]--&gt;         &lt;script src=&quot;..\/bootstrap\/js\/ie-emulation-modes-warning.js&quot;&gt;&lt;\/script&gt;          &lt;!--[if lt IE 9]&gt;         &lt;script src=&quot;https:\/\/oss.maxcdn.com\/html5shiv\/3.7.2\/html5shiv.min.js&quot;&gt;&lt;\/script&gt;         &lt;script src=&quot;https:\/\/oss.maxcdn.com\/respond\/1.4.2\/respond.min.js&quot;&gt;&lt;\/script&gt;         &lt;![endif]--&gt;      &lt;\/head&gt;      &lt;body&gt;          &lt;div class=&quot;container&quot;&gt;              &lt;ul ngc-accordion=&quot;accordion0&quot; style=&quot;height: 200px;&quot;&gt;                 &lt;li ngc-accordion-tab=&quot;tab1&quot; ngc-template=&quot;..\/Templates\/fixheight.html&quot;&gt;tab1&lt;\/li&gt;                 &lt;li ngc-accordion-tab=&quot;tab2&quot; ngc-template=&quot;..\/Templates\/fixheight.html&quot;&gt;tab2&lt;\/li&gt;                 &lt;li ngc-accordion-tab=&quot;tab3&quot; ngc-template=&quot;..\/Templates\/fixheight.html&quot;&gt;tab3&lt;\/li&gt;             &lt;\/ul&gt;          &lt;\/div&gt;          &lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.2\/jquery.min.js&quot;&gt;&lt;\/script&gt;         &lt;script src=&quot;https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.4\/js\/bootstrap.min.js&quot;&gt;&lt;\/script&gt;         &lt;!-- IE10 viewport hack for Surface\/desktop Windows 8 bug --&gt;         &lt;!--&lt;script src=&quot;..\/bootstrap\/js\/ie10-viewport-bug-workaround.js&quot;&gt;&lt;\/script&gt;--&gt;          &lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.3.15\/angular.min.js&quot;&gt;&lt;\/script&gt;         &lt;script src=&quot;..\/accordion.js&quot;&gt;&lt;\/script&gt;&lt;!--http:\/\/js4lcaeq.github.io\/v1\/v1\/--&gt;         &lt;script src=&quot;app.js&quot;&gt;&lt;\/script&gt;     &lt;\/body&gt; &lt;\/html&gt;      <\/code><\/pre>\n<p>  \u041a\u0440\u043e\u043c\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f Bootstrap \u0438 AngularJS, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0444\u0430\u0439\u043b \u0441\u0442\u0438\u043b\u0435\u0439:<\/p>\n<pre><code class=\"html\">    .accordioncontainer {     display: block;     list-style: none;     margin: 0;     padding: 0;     height: 100%;     overflow: hidden;     }      .accordiontab {     margin: 0;     padding: 0;     display: block;     float: left;     height: 100%;     }      .accordion-tab-box {     height: 100%;     margin-right: 2px;     }      .accordion-tab-body {     float: left;     overflow: hidden;     }      .accordion-tab-header {     width: 30px;     height: 100%;     float: left;     }      .accordion-tab-header-text {     transform: rotate(-90deg);     }     <\/code><\/pre>\n<p>  \u0418 \u0444\u0430\u0439\u043b JavaScript:<\/p>\n<pre><code class=\"html\">    angular.module('app', ['AccordionModule'])     .controller('MainCtrl', ['$scope',function ($scope) {      }]);     angular.bootstrap(&quot;html&quot;, ['app']);     <\/code><\/pre>\n<p>  \u041e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"html\">\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Bootstrap, \u0441\u0442\u0438\u043b\u0438 - &lt;link href=&quot;https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.4\/css\/bootstrap.min.css&quot; rel=&quot;stylesheet&quot; \/&gt; \u0441\u0442\u0438\u043b\u0438 \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u0430 - &lt;link href=&quot;http:\/\/js4lcaeq.github.io\/v1\/v1\/accordion.css&quot; rel=&quot;stylesheet&quot; \/&gt; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 jQuery - &lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.2\/jquery.min.js&quot;&gt;&lt;\/script&gt; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Bootstrap, \u0441\u043a\u0440\u0438\u043f\u0442\u044b - &lt;script src=&quot;https:\/\/maxcdn.bootstrapcdn.com\/bootstrap\/3.3.4\/js\/bootstrap.min.js&quot;&gt;&lt;\/script&gt; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 AngularJS - &lt;script src=&quot;https:\/\/ajax.googleapis.com\/ajax\/libs\/angularjs\/1.3.15\/angular.min.js&quot;&gt;&lt;\/script&gt; \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u0430 - &lt;script src=&quot;http:\/\/js4lcaeq.github.io\/v1\/v1\/accordion.js&quot;&gt;&lt;\/script&gt; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0449\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 - &lt;script src=&quot;http:\/\/js4lcaeq.github.io\/v1\/v1\/SimpleSample\/app.js&quot;&gt;&lt;\/script&gt;     <\/code><\/pre>\n<p>  \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b <strong>ngc-accordion<\/strong>, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0447\u0435\u0440\u0435\u0437 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <strong>ngc-model<\/strong>. \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c <strong><a href=\"http:\/\/js4lcaeq.github.io\/v1\/v1\/FullFeaturedSample\/index.html\">\u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/a><\/strong> \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 <strong>index<\/strong> \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0438 \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>speed<\/strong> \u0442\u0430\u043a \u0436\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <strong>bussy<\/strong> \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 true \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438.       <\/p>\n<div class=\"clear\"><\/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\/267549\/\"> http:\/\/habrahabr.ru\/post\/267549\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0410\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u00ab\u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043a\u043a\u043e\u0440\u0434\u0435\u043e\u043d\u00bb \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c\u0443 (\u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0438 \u0441\u0442\u0438\u043b\u0435\u0439) \u0431\u043b\u043e\u043a\u0443 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 HTML.<\/p>\n<p>  \u0411\u043b\u043e\u043a \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u0434\u0432\u0430 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u2014 \u043e\u0431\u0449\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0438 \u0432\u043a\u043b\u0430\u0434\u043a\u0438:<\/p>\n<pre><code class=\"html\">&lt;ul ngc-accordion&gt;     &lt;li ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04351&quot; template=&quot;template.html&quot;&gt;... &lt;\/li&gt;     &lt;li ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04352&quot; template=&quot;template.html&quot;&gt;... &lt;\/li&gt; &lt;\/ul&gt;     <\/code><\/pre>\n<p>  \u0418\u043b\u0438 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"html\">&lt;div ngc-accordion&gt;     &lt;div ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04351&quot; template=&quot;template.html&quot;&gt;... &lt;\/div&gt;     &lt;div ngc-accordion-tab=&quot;\u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u04352&quot; template=&quot;template.html&quot;&gt;... &lt;\/div&gt; &lt;\/div&gt;     <\/code><\/pre>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/b6b\/57d\/743\/b6b57d743302421885852ee0f08ee952.png\"\/>  <\/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-266247","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266247","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=266247"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/266247\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}