BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c76812c7
Commit
c76812c7
authored
Apr 21, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'vue-doc-2' into 'master'
Add help regarding vue resource and where to include it See merge request !10819
parents
f97d818c
1e92f8b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
vue.md
doc/development/fe_guide/vue.md
+17
-1
No files found.
doc/development/fe_guide/vue.md
View file @
c76812c7
...
@@ -103,6 +103,21 @@ The Service is a class used only to communicate with the server.
...
@@ -103,6 +103,21 @@ The Service is a class used only to communicate with the server.
It does not store or manipulate any data. It is not aware of the store or the components.
It does not store or manipulate any data. It is not aware of the store or the components.
We use
[
vue-resource
][
vue-resource-repo
]
to communicate with the server.
We use
[
vue-resource
][
vue-resource-repo
]
to communicate with the server.
Vue Resource should only be imported in the service file.
```
javascript
import
Vue
from
'vue'
;
import
VueResource
from
'vue-resource'
;
Vue
.
use
(
VueResource
);
```
### CSRF token
We use a Vue Resource interceptor to manage the CSRF token.
`
app
/
assets
/
javascripts
/
vue_shared
/
vue_resource_interceptor
.
js
` holds all our common interceptors.
Note: You don't need to load `
app
/
assets
/
javascripts
/
vue_shared
/
vue_resource_interceptor
.
js
`
since it's already being loaded by `
common_vue
.
js
`.
### End Result
### End Result
The following example shows an application:
The following example shows an application:
...
@@ -288,7 +303,8 @@ new Vue({
...
@@ -288,7 +303,8 @@ new Vue({
```
```
The
[
issue boards service
][
issue-boards-service
]
is a good example of this pattern.
The [issue boards service][issue-boards-service]
is a good example of this pattern.
## Style guide
## Style guide
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment