Question 9
Consider the following Vue application with javascript file “app.js” and markup file “index.html”.
const Teams = { template: `<ol><li v-for='team inteams'>{{team.name}}</li></ol>`, data() { return { teams: [ { name: 'India', points: 827 }, { name: 'Australia', points: 820 }, ], } },}const Rankings = { template: `<ol><li v-for='team in sortedTeams'>{{team.name}}</li></ol>`, data() { return Teams.data() }, computed: { sortedTeams() { return this.teams.sort((team1, team2) => { return team1.points - team2.points // Statement 1 }) }, },}
const router = new VueRouter({ routes: [ { path: '/', component: Teams }, { path: '/ranking', component: Rankings }, ],})
new Vue({ el: '#app', template: `<div> <router-view /> </div>`, router,})index.html:
<div id="app"></div>Suppose the application is running on “http://localhost:8080”. What will be rendered by the browser for the url “http://localhost:8080/#/ranking”