Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7b5f52

Browse files
lex111sdras
authored andcommitted
Improvements in Client-Side Storage recipe (vuejs#1701)
1 parent c5d022c commit a7b5f52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/v2/cookbook/client-side-storage.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Now we've got two fields (again, bound to a Vue instance) but now there is the a
7878

7979
``` js
8080
const app = new Vue({
81-
el:'#app',
81+
el: '#app',
8282
data: {
8383
name: '',
8484
age: 0
@@ -161,7 +161,7 @@ const app = new Vue({
161161
this.saveCats();
162162
},
163163
saveCats() {
164-
let parsed = JSON.stringify(this.cats);
164+
const parsed = JSON.stringify(this.cats);
165165
localStorage.setItem('cats', parsed);
166166
}
167167
}

0 commit comments

Comments
 (0)