Created
June 12, 2019 17:30
-
-
Save sajeetharan/85229d091990d149b9c09d71f3387287 to your computer and use it in GitHub Desktop.
6122019_cosmosdb_home_page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import * as CS from '../cosmos-service'; | |
import * as Model from '../../models/todoItem'; | |
@Component({ | |
selector: 'app-home', | |
templateUrl: 'home.page.html', | |
styleUrls: ['home.page.scss'], | |
}) | |
export class HomePage { | |
service: CS.CosmosService; | |
public things: Model.Todo[]; | |
constructor() { | |
this.service = CS.CosmosService.getInstance(); | |
this.onRefresh(); | |
} | |
async onRefresh() { | |
// Design time data | |
this.things = [ | |
{ description: "Buy milk", completed: false, userId: "pvc", type:"High" }, | |
]; | |
this.things = await this.service.listCollections(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment