This repository was archived by the owner on Nov 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
demo-angular/src/app/home Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ export class HomeComponent implements OnInit {
32
32
console . log ( "Error: " + ( e . message || e ) ) ;
33
33
} ) ;
34
34
}
35
-
35
+
36
36
public buttonGetLocationTap ( ) {
37
- var that = this ;
37
+ let that = this ;
38
38
geolocation . getCurrentLocation ( {
39
39
desiredAccuracy : Accuracy . high ,
40
40
maximumAge : 5000 ,
@@ -47,10 +47,10 @@ export class HomeComponent implements OnInit {
47
47
console . log ( "Error: " + ( e . message || e ) ) ;
48
48
} ) ;
49
49
}
50
-
50
+
51
51
public buttonStartTap ( ) {
52
52
try {
53
- var that = this ;
53
+ let that = this ;
54
54
this . watchIds . push ( geolocation . watchLocation (
55
55
function ( loc ) {
56
56
if ( loc ) {
@@ -70,15 +70,15 @@ export class HomeComponent implements OnInit {
70
70
console . log ( "Error: " + ex . message ) ;
71
71
}
72
72
}
73
-
73
+
74
74
public buttonStopTap ( ) {
75
75
let watchId = this . watchIds . pop ( ) ;
76
76
while ( watchId != null ) {
77
77
geolocation . clearWatch ( watchId ) ;
78
78
watchId = this . watchIds . pop ( ) ;
79
79
}
80
80
}
81
-
81
+
82
82
public buttonClearTap ( ) {
83
83
this . locations . splice ( 0 , this . locations . length ) ;
84
84
}
Original file line number Diff line number Diff line change 45
45
});
46
46
},
47
47
buttonGetLocationTap : function () {
48
- var that = this ;
48
+ let that = this ;
49
49
geolocation .getCurrentLocation ({
50
50
desiredAccuracy: Accuracy .high ,
51
51
maximumAge: 5000 ,
60
60
},
61
61
buttonStartTap : function () {
62
62
try {
63
- var that = this ;
63
+ let that = this ;
64
64
this .watchIds .push (geolocation .watchLocation (
65
65
function (loc ) {
66
66
if (loc) {
Original file line number Diff line number Diff line change 15
15
"build" : " npm i && tsc" ,
16
16
"test.android" : " npm i && npm run tsc && npm run tslint && cd ../demo && tns build android && tns test android --justlaunch" ,
17
17
"test.ios" : " npm i && npm run tsc && npm run tslint && cd ../demo && tns build ios && tns test ios --justlaunch" ,
18
- "tslint" : " cd .. && tslint \" **/*.ts\" --config tslint.json --exclude \" **/node_modules/**\" " ,
18
+ "tslint" : " cd .. && tslint \" **/*.ts\" --config tslint.json --exclude \" **/node_modules/**\" --exclude \" *demo*/platforms/** \" " ,
19
19
"plugin.link" : " npm link && cd ../demo && npm link nativescript-geolocation && cd ../src" ,
20
20
"plugin.tscwatch" : " npm run tsc -- -w" ,
21
21
"demo.ios" : " npm i && npm run tsc && cd ../demo && tns run ios --syncAllFiles" ,
You can’t perform that action at this time.
0 commit comments