Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(bugfix) locale.ready() now resolves with data #99

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PiusNyakoojo
Copy link

@PiusNyakoojo PiusNyakoojo commented Oct 8, 2016

The documentation suggests that locale.ready(some_path) should return a promise that resolves with the data requested rather than the path.

angular.module('myApp', ['ngLocalize'])
    .controller('exampleCtrl', ['$scope', 'locale',
        function ($scope, locale) {
            locale.ready('common').then(function (res) {
                // Before fix:
                // res --> 'common'

                // After fix:
                //res --> { "helloWorld" : "Hello World!", ... }
            });
        }
    ]);

This change is Reviewable

The documentation suggests that locale.ready(some_path) should return a promise that resolves with the data requested rather than the path.

angular.module('myApp', ['ngLocalize'])
    .controller('exampleCtrl', ['$scope', 'locale',
        function ($scope, locale) {
            locale.ready('common').then(function (res) {
                // Before fix:
                // res --> 'common'

                // After fix:
                //res --> { "helloWorld" : "Hello World!", ... }
            });
        }
    ]);
@PiusNyakoojo PiusNyakoojo changed the title (bugfix) locale.ready() now resolves to data (bugfix) locale.ready() now resolves with data Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant