Skip to content

Commit f867b41

Browse files
committed
Renaming getConfig() -> get() to match new behavior
1 parent 1c1f91b commit f867b41

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/state.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ function $StateProvider( $urlRouterProvider, $urlMatcherFactory, $
335335
return !$locationProvider.html5Mode() && url ? "#" + url : url;
336336
};
337337

338-
$state.getConfig = function (stateOrName) {
338+
$state.get = function (stateOrName) {
339339
var state = findState(stateOrName);
340340
return (state && state.self) ? state.self : null;
341341
};

test/stateSpec.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -375,12 +375,12 @@ describe('state', function () {
375375
}));
376376
});
377377

378-
describe('.getConfig()', function () {
378+
describe('.get()', function () {
379379
it("should return the state's config", inject(function ($state) {
380-
expect($state.getConfig('home').url).toBe('/');
381-
expect($state.getConfig('home.item').url).toBe('front/:id');
382-
expect($state.getConfig('A')).toBe(A);
383-
expect($state.getConfig('Z')).toBeNull();
380+
expect($state.get('home').url).toBe('/');
381+
expect($state.get('home.item').url).toBe('front/:id');
382+
expect($state.get('A')).toBe(A);
383+
expect($state.get('Z')).toBeNull();
384384
}));
385385
});
386386

0 commit comments

Comments
 (0)