File tree 1 file changed +22
-22
lines changed
1 file changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ Following his articile and trying to have some write up. (e.g. using latest pack
4
4
5
5
## Install and run:
6
6
if Webpack is not installed yet:
7
- ` npm install -g webpack
7
+ npm install -g webpack
8
8
9
- ` dotnet restore
10
- npm install
11
- webpack
12
- dotnet run`
9
+ dotnet restore
10
+ npm install
11
+ webpack
12
+ dotnet run
13
13
## Packages used:
14
14
- lodash <- similiar to numpy in Python, utilies library for manipulating array/object.
15
15
- axios <- Promise based HTTP client for the browser and Node.js, think of $.ajax() if you come from jQuery world
@@ -39,24 +39,24 @@ dotnet run`
39
39
Here we try to modify the implementation order different from the original post.
40
40
We are going to add the loading indicator before implementing the Server Side Rendering.
41
41
To simulate timely API call form remote server, we add the following line in HomeController.cs:
42
- ` public JsonResult initialMessages(){
43
- //Added to simulate initial loading from remote server
44
- Thread.Sleep(2000);
45
- ...
46
- }`
42
+ public JsonResult initialMessages(){
43
+ //Added to simulate initial loading from remote server
44
+ Thread.Sleep(2000);
45
+ ...
46
+ }
47
47
48
48
1 . Add nprogess in package.json dependency:
49
- ` "dependencies": {
50
- "vue": "^2.5.8",
51
- "vuex": "^3.0.1",
52
- "vue-router": "^3.0.1",
53
- "lodash": "^4.17.4",
54
- "axios": "^0.17.1",
55
- "nprogress": "^0.2.0"
56
- },`
49
+ "dependencies": {
50
+ "vue": "^2.5.8",
51
+ "vuex": "^3.0.1",
52
+ "vue-router": "^3.0.1",
53
+ "lodash": "^4.17.4",
54
+ "axios": "^0.17.1",
55
+ "nprogress": "^0.2.0"
56
+ }
57
57
2 . Add style-loader and css-loader to webpack.config:
58
- ` {
59
- test: /\. css$/,
60
- loader: "style-loader!css-loader"
61
- }`
58
+ {
59
+ test: /\. css$/,
60
+ loader: "style-loader!css-loader"
61
+ }
62
62
3 . Modify ClientApp/vuex/actions.js, add ` NProgress.start() ` and ` NProgress.done() ` before and after axios remote call.
You can’t perform that action at this time.
0 commit comments