mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 15:39:08 +00:00
Recommend the component_[css/js}_dependencies tags.
This commit is contained in:
parent
3c1ef43198
commit
b30506087c
1 changed files with 3 additions and 2 deletions
|
@ -169,7 +169,7 @@ And voilá!! We've created our first component.
|
|||
|
||||
# Use the component in a template
|
||||
|
||||
First load the `component_tags` tag library, then use the `component_dependencies` and `component` tags to render the component to the page.
|
||||
First load the `component_tags` tag library, then use the `component_[js/css]_dependencies` and `component` tags to render the component to the page.
|
||||
|
||||
```htmldjango
|
||||
{% load component_tags %}
|
||||
|
@ -177,10 +177,11 @@ First load the `component_tags` tag library, then use the `component_dependencie
|
|||
<html>
|
||||
<head>
|
||||
<title>My example calendar</title>
|
||||
{% component_dependencies %}
|
||||
{% component_css_dependencies %}
|
||||
</head>
|
||||
<body>
|
||||
{% component "calendar" date="2015-06-19" %}
|
||||
{% component_js_dependencies %}
|
||||
</body>
|
||||
<html>
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue