Skip to content

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