amend($ionicConfigProvider): fix typo, add unit tests

This commit is contained in:
Andrew
2014-08-15 13:11:44 -06:00
parent 2643cffc19
commit 834e2bb173
2 changed files with 25 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ IonicModule
/**
* @ngdoc method
* @name $ionicConfigProvider#prefetchTemplates
* @description Set whether Ionic should prefetch all templateUrls defined in
* @description Set whether Ionic should prefetch all templateUrls defined in
* $stateProvider.state. Default true. If set to false, the user will have to wait
* for a template to be fetched the first time he/she is going to a a new page.
* @param shouldPrefetch Whether Ionic should prefetch templateUrls defined in
@@ -34,9 +34,9 @@ IonicModule
*/
this.prefetchTemplates = function(newValue) {
if (arguments.length) {
config.prefetchTemlates = newValue;
config.prefetchTemplates = newValue;
}
return config.prefetchTemlates;
return config.prefetchTemplates;
};
// private: Service definition for internal Ionic use