|
130 | 130 | "ion-ctrl-import": {
|
131 | 131 | "prefix": "i-ctrl-import",
|
132 | 132 | "body": [
|
133 |
| - "import { ${1|ActionSheetController,AlertController,LoadingController,ModalController,ToastController,PopoverController|} } from '@ionic/angular';" |
| 133 | + "import { ${1|ActionSheetController,AlertController,LoadingController,ModalController,ToastController,PopoverController,PickerController|} } from '@ionic/angular';" |
134 | 134 | ],
|
135 | 135 | "description": "Imports from @ionic/angular package"
|
136 | 136 | },
|
|
225 | 225 | ],
|
226 | 226 | "description": "Ionic ModalController"
|
227 | 227 | },
|
| 228 | + "ion-picker": { |
| 229 | + "prefix": "i-picker", |
| 230 | + "body": [ |
| 231 | + "async ${1:presentPicker}() {", |
| 232 | + "\tconst ${2:picker} = await this.${3:pickerController}.create({", |
| 233 | + "\tanimated: ${4:true},", |
| 234 | + "\tbuttons: [{", |
| 235 | + "\t\ttext: '${5:Save}',", |
| 236 | + "\t\thandler: () => console.log('Clicked Save!')", |
| 237 | + "\t}, {", |
| 238 | + "\t\ttext: '${6:Log}',", |
| 239 | + "\t\thandler: (val) => {", |
| 240 | + "\t\t\tconsole.log('Clicked Log. Do not Dismiss.', val);", |
| 241 | + "\t\t\treturn false;", |
| 242 | + "\t\t}", |
| 243 | + "\t}],", |
| 244 | + "\tcolumns: [", |
| 245 | + "\t\t{", |
| 246 | + "\t\t\tname: '${7:hours}',", |
| 247 | + "\t\t\tprefix: '${8:total}',", |
| 248 | + "\t\t\tsuffix: '${9:hours}',", |
| 249 | + "\t\t\toptions: [", |
| 250 | + "\t\t\t\t{", |
| 251 | + "\t\t\t\t\ttext: '${10:1}',", |
| 252 | + "\t\t\t\t\tvalue: '${11:01}'", |
| 253 | + "\t\t\t\t},", |
| 254 | + "\t\t\t\t{", |
| 255 | + "\t\t\t\t\ttext: '${12:2}',", |
| 256 | + "\t\t\t\t\tvalue: '${13:02}'", |
| 257 | + "\t\t\t\t}", |
| 258 | + "\t\t\t]", |
| 259 | + "\t\t}", |
| 260 | + "\t],", |
| 261 | + "\tcssClass: '${14:picker-hours}',", |
| 262 | + "\tmode: '${15|ios,md|}',", |
| 263 | + "\t});", |
| 264 | + "\t${2:picker}.present();", |
| 265 | + "}" |
| 266 | + ], |
| 267 | + "description": "Ionic Picker" |
| 268 | + }, |
| 269 | + "ion-picker-column": { |
| 270 | + "prefix": "i-picker-column", |
| 271 | + "body": [ |
| 272 | + "{", |
| 273 | + "\tname: '${1:hours}',", |
| 274 | + "\tprefix: '${2:total}',", |
| 275 | + "\tsuffix: '${3:hours}',", |
| 276 | + "\toptions: [", |
| 277 | + "\t\t{", |
| 278 | + "\t\t\ttext: '${4:1}',", |
| 279 | + "\t\t\tvalue: '${5:01}'", |
| 280 | + "\t\t},", |
| 281 | + "\t\t{", |
| 282 | + "\t\t\ttext: '${6:2}',", |
| 283 | + "\t\t\tvalue: '${7:02}'", |
| 284 | + "\t\t}", |
| 285 | + "\t]", |
| 286 | + "}" |
| 287 | + ], |
| 288 | + "description": "Ionic Picker Column" |
| 289 | + }, |
| 290 | + "ion-picker-options": { |
| 291 | + "prefix": "i-picker-options", |
| 292 | + "body": [ |
| 293 | + "{", |
| 294 | + "\ttext: '${1:1}',", |
| 295 | + "\tvalue: '${2:01}'", |
| 296 | + "}" |
| 297 | + ], |
| 298 | + "description": "Ionic Picker Options" |
| 299 | + }, |
| 300 | + "ion-picker-ctrl": { |
| 301 | + "prefix": "i-picker-ctrl", |
| 302 | + "body": [ |
| 303 | + "public ${1:pickerController}: PickerController" |
| 304 | + ], |
| 305 | + "description": "Ionic PickerController" |
| 306 | + }, |
228 | 307 | "ion-popover": {
|
229 | 308 | "prefix": "i-popover",
|
230 | 309 | "body": [
|
|
0 commit comments