2014-02-07 46 views
0

我是AngularJS的新手。也許這個問題很荒謬,但我不知道該怎麼做。我有兩個配置方法。AngularJS中幾個app.config方法的合併

App.config(function($httpProvider) { 
    // do something with $httpProvider 
}); 

App.config(function($compileProvider) { 
    // do something with $compileProvider 
}); 

如何使用這兩個供應商爲一體的.config方法?

此致敬禮。

回答

2

試試這個:

App.config(function($httpProvider, $compileProvider) { 
    // do something with $httpProvider and $compileProvider) 
});