From db1e718d5764bec5a878896adc44543819078390 Mon Sep 17 00:00:00 2001 From: christopherthielen Date: Mon, 2 Feb 2015 09:09:48 -0600 Subject: [PATCH] fix(future): fix modular build of futurestates - missing reference to internalStates in core module, hidden by closure fixes #151 --- src/future.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/future.js b/src/future.js index 4567317..a609346 100644 --- a/src/future.js +++ b/src/future.js @@ -1,7 +1,10 @@ (function(angular, undefined) { var app = angular.module('ct.ui.router.extras.future', [ 'ct.ui.router.extras.core' ]); - function _futureStateProvider($stateProvider, $urlRouterProvider, $urlMatcherFactory) { + _futureStateProvider.$inject = [ '$stateProvider', '$urlRouterProvider', '$urlMatcherFactoryProvider', 'uirextras_coreProvider' ]; + function _futureStateProvider($stateProvider, $urlRouterProvider, $urlMatcherFactory, uirextras_coreProvider) { + var core = uirextras_coreProvider; + var internalStates = core.internalStates; var stateFactories = {}, futureStates = {}; var lazyloadInProgress = false, resolveFunctions = [], initPromise, initDone = false; var provider = this; @@ -265,7 +268,7 @@ ]; } - app.provider('$futureState', [ '$stateProvider', '$urlRouterProvider', '$urlMatcherFactoryProvider', _futureStateProvider]); + app.provider('$futureState', _futureStateProvider); var statesAddedQueue = { state: function(state) {