Преглед изворни кода

Add a new html_attributes to work with angular.js

Angular JS require to add a new attribute ng-app to the html tag.

This new block allow us to add it, for example :

{% block html_attributes %}ng-app="PrestaCMS.Page"{% endblock %}
Nicolas Bastien пре 11 година
родитељ
комит
4d0e35c4fd
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Resources/views/standard_layout.html.twig

+ 1 - 1
Resources/views/standard_layout.html.twig

@@ -18,7 +18,7 @@ file that was distributed with this source code.
 {% set _title        = block('title') %}
 {% set _breadcrumb   = block('breadcrumb') %}
 <!DOCTYPE html>
-<html class="no-js">
+<html class="no-js" {% block html_attributes %}{% endblock %}>
     <head>
         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />