amazon-archives / aws-cognito-angular-quickstart

An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
https://cognito.budilov.com
Apache License 2.0
689 stars 304 forks source link

How to get and display single data from a string in a array #100

Closed chris86 closed 7 years ago

chris86 commented 7 years ago

Hi I just went through your code and I am trying something in the useractivitycomponent.ts there is this code public logdata: Array<Stuff> = []; now I am trying to get the type or date at postition 0 in the component file I i tried doing different things but cant get it to work I am learning Typescript public myHero = this.logdata[0]; public stuff: Stuff = new Stuff(); public mmm: string = this.stuff.date; public myfirstdate: string = this.stuff[0].date;

I hope you understand what i am trying to do I am trying to get the first object in the array "date"

vbudilov commented 7 years ago

Hi @chris86 ,

This is more of a JS question rather than a Cognito question, so you might want to use stackoverflow for that.

Vladimir