Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sajeetharan/85229d091990d149b9c09d71f3387287 to your computer and use it in GitHub Desktop.
Save sajeetharan/85229d091990d149b9c09d71f3387287 to your computer and use it in GitHub Desktop.
6122019_cosmosdb_home_page
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