UpTest > Web Development > AngularJS Test

Test: AngularJS Test

Question 1: Prev Next Hide answers

Which of the following is valid route definition?

app.config(function($ routeProvider) { $routeProvider

.when("/1", { templateUrl : "1.htm"
})
.when("/2", { templateUrl : "2.htm"
})
.otherwise( {
templateUrl : "default.htm"
})

});
1 votes
app.config(function($ routeProvider) { $routeProvider

.when("/1", { templateUrl : "1.htm"
})
.when("/2", { templateUrl : "2.htm"
})
.default( {
templateUrl : "default.htm"
})
});
0 votes
 app.config(function($routeProvider) { $routeProvider
.on("/1", {

templateUrl : "1.htm" })
.on("/2", {
templateUrl : "2.htm"
})
.default( {
templateUrl : "default.htm"
})
});
1 votes
app.config(function($ routeProvider) { $routeProvider
.on("/1", {

templateUrl : "1.htm" })
.on("/2", {
templateUrl : "2.htm"
})
.otherwise( {
templateUrl : "default.htm"
})
});
0 votes
Please login to submit your answer.