Skip to content

Commit e409a2d

Browse files
Routing Links, Routing Modes, Route Parameters, Register Locally, Mixins and Filters
1 parent f36a8d9 commit e409a2d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+85303
-1
lines changed

Filters/vuejsproj/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Filters
22
```
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.
3+
A Filter is used to change the output/display of data to the browser. For example I have the title and body outputted to the browser.
44
I can change for example the output of the title from lowercase to uppercase. Filters do not however change the data directly
55
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
66
to add a pipe to the end of the data and tack on the filter name.

Mixins/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+
}

Mixins/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

Mixins/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

Mixins/vuejsproj/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Mixins
2+
```
3+
Chunk Of Code that I can use over and over and over again in different parts of my application.
4+
I created a computed property called filteredBlogs which was used to filter through an array
5+
to show only certain blog depending on my search criteria. Say this functionality was absolutely
6+
fantastic did save a lot of time for the user and I wanted it in another part of my application.
7+
Now, if I wanted it the normal way I would have to register that computed property in each and every
8+
component I have. This can be tedious if I have 100 components. What would save me time and energy,
9+
is I can do is store this computed property in a mixin and import it in every single component that
10+
needs to use that functionality.
11+
12+
In a nutshell, mixins are used to externalize popular pieces of code I use again and again by simply
13+
importing them to whichever component I need them in.
14+
```

Mixins/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)