Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Get of array is undefined

$
0
0

@pavan_kumar_l wrote:

 
export class MySelectComponent extends Ember.Component {

content: Array<any> = [
  {
			"label": "Name (a-z)",
			"value": "name:asc"
		},
		{
			"label": "Name (z-a)",
			"value": "name:desc"
		}
];

label: string = "Select";

didInsertElement (): void {
  console.log(this.get("content"));
}

actions: any = {
  select (value: any): void {
    this.sendAction("action", value);
   }
  };
 }
}

What am I doing wrong here. get("label") returns proper value but get("content") is undefined.

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles