{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1795","repository_url":"https://api.github.com/repos/angular-ui/angular-google-maps","labels_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1795/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1795/comments","events_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1795/events","html_url":"https://github.com/angular-ui/angular-google-maps/pull/1795","id":146195775,"number":1795,"title":"Use a ready event handler","user":{"login":"xkjyeah","id":2659143,"avatar_url":"https://avatars.githubusercontent.com/u/2659143?v=3","gravatar_id":"","url":"https://api.github.com/users/xkjyeah","html_url":"https://github.com/xkjyeah","followers_url":"https://api.github.com/users/xkjyeah/followers","following_url":"https://api.github.com/users/xkjyeah/following{/other_user}","gists_url":"https://api.github.com/users/xkjyeah/gists{/gist_id}","starred_url":"https://api.github.com/users/xkjyeah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xkjyeah/subscriptions","organizations_url":"https://api.github.com/users/xkjyeah/orgs","repos_url":"https://api.github.com/users/xkjyeah/repos","events_url":"https://api.github.com/users/xkjyeah/events{/privacy}","received_events_url":"https://api.github.com/users/xkjyeah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-06T06:05:37Z","updated_at":"2016-04-09T02:29:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/pulls/1795","html_url":"https://github.com/angular-ui/angular-google-maps/pull/1795","diff_url":"https://github.com/angular-ui/angular-google-maps/pull/1795.diff","patch_url":"https://github.com/angular-ui/angular-google-maps/pull/1795.patch"},"body":"This creates an event handler ready which is called after the control is populated\r\n\r\nExample:\r\n```\r\n<ui-gmap-google-map\r\n    control=\"control\"\r\n    ready=\"onmapready()\"\r\n\t\t>\r\n</ui-gmap-google-map>\r\n```\r\nThus you can write:\r\n```javascript\r\n// Controller function\r\nfunction($scope, uiGmapGoogleMapApi) {\r\n    $scope.control = {}\r\n    $scope.onmapready = function() {\r\n        console.log($scope.control.getGMap) // not undefined\r\n        $scope.control.getGMap().fitBounds(myBounds);\r\n    }\r\n}\r\n```\r\n\r\nThis obviates the headache with tracking instance numbers using `uiGmapIsReady`"},"comment":{"url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/comments/207685026","html_url":"https://github.com/angular-ui/angular-google-maps/pull/1795#issuecomment-207685026","issue_url":"https://api.github.com/repos/angular-ui/angular-google-maps/issues/1795","id":207685026,"user":{"login":"xkjyeah","id":2659143,"avatar_url":"https://avatars.githubusercontent.com/u/2659143?v=3","gravatar_id":"","url":"https://api.github.com/users/xkjyeah","html_url":"https://github.com/xkjyeah","followers_url":"https://api.github.com/users/xkjyeah/followers","following_url":"https://api.github.com/users/xkjyeah/following{/other_user}","gists_url":"https://api.github.com/users/xkjyeah/gists{/gist_id}","starred_url":"https://api.github.com/users/xkjyeah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xkjyeah/subscriptions","organizations_url":"https://api.github.com/users/xkjyeah/orgs","repos_url":"https://api.github.com/users/xkjyeah/repos","events_url":"https://api.github.com/users/xkjyeah/events{/privacy}","received_events_url":"https://api.github.com/users/xkjyeah/received_events","type":"User","site_admin":false},"created_at":"2016-04-09T02:29:47Z","updated_at":"2016-04-09T02:29:47Z","body":"Ok fixed that, but Travis has some problem install NPM :/"}}