{"action":"created","issue":{"url":"https://api.github.com/repos/jseppi/angular-dropdowns/issues/56","labels_url":"https://api.github.com/repos/jseppi/angular-dropdowns/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/jseppi/angular-dropdowns/issues/56/comments","events_url":"https://api.github.com/repos/jseppi/angular-dropdowns/issues/56/events","html_url":"https://github.com/jseppi/angular-dropdowns/issues/56","id":93318083,"number":56,"title":"Not able to use angular-translate with angular-dropdowns","user":{"login":"mukulgupta2507","id":4299536,"avatar_url":"https://avatars.githubusercontent.com/u/4299536?v=3","gravatar_id":"","url":"https://api.github.com/users/mukulgupta2507","html_url":"https://github.com/mukulgupta2507","followers_url":"https://api.github.com/users/mukulgupta2507/followers","following_url":"https://api.github.com/users/mukulgupta2507/following{/other_user}","gists_url":"https://api.github.com/users/mukulgupta2507/gists{/gist_id}","starred_url":"https://api.github.com/users/mukulgupta2507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mukulgupta2507/subscriptions","organizations_url":"https://api.github.com/users/mukulgupta2507/orgs","repos_url":"https://api.github.com/users/mukulgupta2507/repos","events_url":"https://api.github.com/users/mukulgupta2507/events{/privacy}","received_events_url":"https://api.github.com/users/mukulgupta2507/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-06T16:15:22Z","updated_at":"2015-07-06T16:40:58Z","closed_at":"2015-07-06T16:34:49Z","body":"Hi,\r\n\r\nI'm using angular-dropdowns in my project and it's working seamlessly so far. I'm not able to figure out how to use angular-translate with dropdown options. I have used angular-translate in other view using:\r\n \r\n```{{someText|translate}} ```\r\n\r\nbut not now since I'm giving an array of options with their corresponsing values as described in the examples. Can anyone please tell me how can I use angular-translate here in this scenario ?\r\n\r\nScenario from the given example:\r\n\r\n```\r\napp.controller('AppCtrl', function($scope) {\r\n\r\n    // By default the 'text' property will be used as the display text in the dropdown entry.\r\n    // All options that are not dividers must have a 'text' property.\r\n    // You can specify a different property name in place of 'text' via the dropdown-item-label attribute.\r\n    // A divider with a 'text' property will also be non-selectable.\r\n    //\r\n    // If an options object has an 'href' property set, then that dropdown entry\r\n    //   will behave as a link and cannot be selected.\r\n    $scope.ddSelectOptions = [\r\n        {\r\n            text: 'Option1',\r\n            value: 'a value'\r\n        },\r\n        {\r\n            text: 'Option2',\r\n            value: 'another value'\r\n        }\r\n    ];\r\n\r\n    $scope.ddSelectSelected = {}; // Must be an object\r\n});\r\n```\r\n\r\nNow, if I want to translate Option1 and Option2 using angular translate in my controller/view, how can I do it?\r\n\r\nP.S: I tried my regular approach by using \r\n```\r\n{{\"Option1\"|translate}} and {{\"Option12\"|translate}} \r\n```\r\n\r\n```\r\napp.controller('AppCtrl', function($scope) {\r\n\r\n    // By default the 'text' property will be used as the display text in the dropdown entry.\r\n    // All options that are not dividers must have a 'text' property.\r\n    // You can specify a different property name in place of 'text' via the dropdown-item-label attribute.\r\n    // A divider with a 'text' property will also be non-selectable.\r\n    //\r\n    // If an options object has an 'href' property set, then that dropdown entry\r\n    //   will behave as a link and cannot be selected.\r\n    $scope.ddSelectOptions = [\r\n        {\r\n            text: '{{Option1|translate}}',\r\n            value: 'a value'\r\n        },\r\n        {\r\n            text: '{{Option2|translate}}',\r\n            value: 'another value'\r\n        }\r\n    ];\r\n\r\n    $scope.ddSelectSelected = {}; // Must be an object\r\n});\r\n```\r\n\r\nbut somehow that is also not working. \r\n\r\nCan anyone please help me with this ?\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/jseppi/angular-dropdowns/issues/comments/118920523","html_url":"https://github.com/jseppi/angular-dropdowns/issues/56#issuecomment-118920523","issue_url":"https://api.github.com/repos/jseppi/angular-dropdowns/issues/56","id":118920523,"user":{"login":"mukulgupta2507","id":4299536,"avatar_url":"https://avatars.githubusercontent.com/u/4299536?v=3","gravatar_id":"","url":"https://api.github.com/users/mukulgupta2507","html_url":"https://github.com/mukulgupta2507","followers_url":"https://api.github.com/users/mukulgupta2507/followers","following_url":"https://api.github.com/users/mukulgupta2507/following{/other_user}","gists_url":"https://api.github.com/users/mukulgupta2507/gists{/gist_id}","starred_url":"https://api.github.com/users/mukulgupta2507/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mukulgupta2507/subscriptions","organizations_url":"https://api.github.com/users/mukulgupta2507/orgs","repos_url":"https://api.github.com/users/mukulgupta2507/repos","events_url":"https://api.github.com/users/mukulgupta2507/events{/privacy}","received_events_url":"https://api.github.com/users/mukulgupta2507/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T16:40:58Z","updated_at":"2015-07-06T16:40:58Z","body":"Hi Jseppi,\r\n\r\nI tried using $translate service but issue is it's not working in this case:\r\n\r\n```\r\n    $translate(Option1)\r\n      .then(function (translatedOption1) {\r\n        $scope.Option1AfterTranslation = translatedOption1;\r\n      });\r\n\r\n    $scope.ddSelectOptions = [\r\n        {\r\n            text: $scope.Option1AfterTranslation,    ---> gives undefined in the dropdown option\r\n            value: 'a value'\r\n        }\r\n    ];\r\n```\r\n\r\nAny idea where I'm doing wrong?\r\nI'm just starting with learning angular stuff. Forgive me if I'm missing something very basic.\r\nI do appreciate your help in the issue."}}