import Route from '@ember/routing/route';
class student {
name = null;
gender = null;
class = null;
grade = null;
constructor(name, gender, class, grade) {
this.name = name;
this.gender = gender;
this.class = class;
this.grade = grade
}
show_grade() {
return `I am ${this.name} of
Class ${this.class} Get ${this.grade}`;
}
}
export default class StudentsRoute
extends Route {
students =
[new student('Aakash', 'M', 10, 'A',),
new student('Soniya', 'F', 8, 'C'),
new student('Esnoor', 'M', 9, 'C'),
new student('Isha', 'F', 11, 'B',),
new student('Doman', 'M', 12, 'B'),
new student('Lolu', 'M', 10, 'A'),
new student('Satyam', 'M', 10, 'A'),
];
temp2;
temp;
model() {
return this.students;
}
setupController(controller, model) {
super.setupController(controller, model);
controller.set('students', this.students);
controller.set('temp', this.temp);
controller.set('temp1', this.temp1);
controller.set('temp2', this.temp2);
}
}