在AngularJS中路由到模板时如何从服务调用方法?
wikiApp.config(['$routeProvider', 'faqService', 'newsService',
function($routeProvider, faqService, newsService) {
$routeProvider
.when('/hjem',{
templateUrl: 'partials/homeContent.html',
resolve: {
newsService.setChosenStory("");
faqService.setChosenFAQ("");
}
})
这不正确吗?:S