Skip to content

Commit 9e23511

Browse files
HOW TO USE FILTERS IN VUEJS
1 parent 1bf1c6e commit 9e23511

File tree

14 files changed

+14150
-0
lines changed

14 files changed

+14150
-0
lines changed

Filters/vuejsproj/.babelrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
["env", { "modules": false }],
4+
"stage-3"
5+
]
6+
}

Filters/vuejsproj/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

Filters/vuejsproj/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.DS_Store
2+
node_modules/
3+
dist/
4+
npm-debug.log
5+
yarn-error.log
6+
7+
# Editor directories and files
8+
.idea
9+
*.suo
10+
*.ntvs*
11+
*.njsproj
12+
*.sln

Filters/vuejsproj/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## Filters
2+
```
3+
A Filter is used to change the output of data to the browser. For example I have the title and body outputted to the browser.
4+
I can change for example the output of the title from lowercase to uppercase. Filters do not however change the data directly
5+
wherever they are stored. The only thing we change is the way they output to the browser. To use a filter all you have to do is
6+
to add a pipe to the end of the data and tack on the filter name.
7+
8+
Remember after I created my filter I must register it in similar to how I did with components I register my filter in my main.js file
9+
10+
```
11+

Filters/vuejsproj/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>vuejsproj</title>
6+
</head>
7+
<body>
8+
<div id="app"></div>
9+
<script src="/dist/build.js"></script>
10+
</body>
11+
</html>

0 commit comments

Comments
 (0)