{"action":"created","issue":{"url":"https://api.github.com/repos/ethanhann/eeh-navigation/issues/13","labels_url":"https://api.github.com/repos/ethanhann/eeh-navigation/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ethanhann/eeh-navigation/issues/13/comments","events_url":"https://api.github.com/repos/ethanhann/eeh-navigation/issues/13/events","html_url":"https://github.com/ethanhann/eeh-navigation/issues/13","id":88500322,"number":13,"title":"How to dynamically add menu items?","user":{"login":"mbukosky","id":6832123,"avatar_url":"https://avatars.githubusercontent.com/u/6832123?v=3","gravatar_id":"","url":"https://api.github.com/users/mbukosky","html_url":"https://github.com/mbukosky","followers_url":"https://api.github.com/users/mbukosky/followers","following_url":"https://api.github.com/users/mbukosky/following{/other_user}","gists_url":"https://api.github.com/users/mbukosky/gists{/gist_id}","starred_url":"https://api.github.com/users/mbukosky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbukosky/subscriptions","organizations_url":"https://api.github.com/users/mbukosky/orgs","repos_url":"https://api.github.com/users/mbukosky/repos","events_url":"https://api.github.com/users/mbukosky/events{/privacy}","received_events_url":"https://api.github.com/users/mbukosky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-15T18:13:24Z","updated_at":"2015-06-24T13:38:46Z","closed_at":null,"body":"Hello,\r\n\r\nFrom reading over the documents it says that \r\n> It is possible to create a menu item with the eehNavigation service, but it is not recommended. Instead, create the menu item in .config and only do minimal wiring/contextual configuration elsewhere with the eehNavigation service.\r\n\r\nIf this is the case, how would you go about adding dynamic menu items? I have a use case where the menu items will be returned from a service. But given the life-cycle of angular, it is not possible to use services inside a config. Any suggestions?\r\n\r\nThanks for the support and great app\r\n"},"comment":{"url":"https://api.github.com/repos/ethanhann/eeh-navigation/issues/comments/114870992","html_url":"https://github.com/ethanhann/eeh-navigation/issues/13#issuecomment-114870992","issue_url":"https://api.github.com/repos/ethanhann/eeh-navigation/issues/13","id":114870992,"user":{"login":"mbukosky","id":6832123,"avatar_url":"https://avatars.githubusercontent.com/u/6832123?v=3","gravatar_id":"","url":"https://api.github.com/users/mbukosky","html_url":"https://github.com/mbukosky","followers_url":"https://api.github.com/users/mbukosky/followers","following_url":"https://api.github.com/users/mbukosky/following{/other_user}","gists_url":"https://api.github.com/users/mbukosky/gists{/gist_id}","starred_url":"https://api.github.com/users/mbukosky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbukosky/subscriptions","organizations_url":"https://api.github.com/users/mbukosky/orgs","repos_url":"https://api.github.com/users/mbukosky/repos","events_url":"https://api.github.com/users/mbukosky/events{/privacy}","received_events_url":"https://api.github.com/users/mbukosky/received_events","type":"User","site_admin":false},"created_at":"2015-06-24T13:38:46Z","updated_at":"2015-06-24T13:38:46Z","body":"Sorry to reopen this but I was able to create an example where loading for controller doesn't work. I added a timeout to simulate a async http request. I have updated my code pen example to show that the 'three' menu is not added.\r\n\r\nI believe this is occurring because the digest has already fired. I tried adding a $scope.$apply but that didn't work either. \r\n\r\nAny ideas?\r\n\r\n```js\r\n    setTimeout(function() {\r\n      eehNavigation\r\n        .menuItem('foo.three', {\r\n          text: 'Three',\r\n          iconClass: 'fa fa-cube',\r\n          state: 'foo.three'\r\n        });\r\n    }, 1000);\r\n```"}}