dhoko / angular-ngBabelfish

Internationalization module for angular.js, it's magic !
MIT License
11 stars 3 forks source link

add an event when babelfish finished loading #19

Closed hthabet closed 10 years ago

hthabet commented 10 years ago

after setting the language, it's useful to have an event after loading the data

function setTranslation(page) { 
...
$rootScope.$emit("i18n:babelfish:loaded");
}
dhoko commented 10 years ago

Upgrade events:

Params for ngBabelfish.translation.loaded:

$rootScope.$emit('ngBabelfish.translation:loaded', {
  currentState: page,
  lang: lang
});