File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Custom Elements with Rails
2
2
3
- This gem provides a small js-helper, installation and generators to use custom elements in conjunction with ` importmap-rails ` gem.
3
+ This gem provides a small js-helper, installation scripts and generators to use custom elements in conjunction with the ` importmap-rails ` gem.
4
4
5
5
## Usage
6
6
7
7
## Installation
8
+
8
9
Add this line to your application's Gemfile:
9
10
10
11
``` ruby
@@ -38,7 +39,7 @@ You can now add the `<app-hello>` custom element in your HTML. No build step nee
38
39
## How it works
39
40
40
41
` eagerDefineCustomElementsFrom ` will parse the JSON-importmap rendered by the ` importmap-rails ` gem.
41
- It registers custom elements with ` customElements.define(...) ` to the browser's custom element registry based on the filename automatically.
42
+ It registers custom elements with ` customElements.define(...) ` in the browser's registry based on the filename automatically.
42
43
43
44
```
44
45
custom_elements/hello_element.js // will register <app-hello>
You can’t perform that action at this time.
0 commit comments