{"action":"opened","issue":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/369","labels_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/369/labels{/name}","comments_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/369/comments","events_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/369/events","html_url":"https://github.com/Urigo/angular-meteor/issues/369","id":81105306,"number":369,"title":"Problems with $meteor.object working on chrome but not firefox","user":{"login":"paixaop","id":327006,"avatar_url":"https://avatars.githubusercontent.com/u/327006?v=3","gravatar_id":"","url":"https://api.github.com/users/paixaop","html_url":"https://github.com/paixaop","followers_url":"https://api.github.com/users/paixaop/followers","following_url":"https://api.github.com/users/paixaop/following{/other_user}","gists_url":"https://api.github.com/users/paixaop/gists{/gist_id}","starred_url":"https://api.github.com/users/paixaop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paixaop/subscriptions","organizations_url":"https://api.github.com/users/paixaop/orgs","repos_url":"https://api.github.com/users/paixaop/repos","events_url":"https://api.github.com/users/paixaop/events{/privacy}","received_events_url":"https://api.github.com/users/paixaop/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-26T19:38:57Z","updated_at":"2015-05-26T19:38:57Z","closed_at":null,"body":"I am running into a problem that I cannot figure out, most likely due to inexperience. I created an element directive and have the following code (client/components/master-directive.js):\r\n\r\n    var module = angular.module('masterControl', ['angular-meteor']);\r\n\r\n    module.directive('masterControl', function() {\r\n      return {\r\n        scope: {\r\n          name: '@'\r\n        },\r\n        templateUrl: 'client/components/control/master-control-template.ng.html',\r\n        controller: 'masterControlController'\r\n      };\r\n    });\r\n\r\n    module.controller('masterControlController', ['$scope', '$meteor',\r\n      function($scope, $meteor) {\r\n        $scope.control = $meteor.object(Controls, { name: $scope.name } );\r\n        var thing = $scope.control.getRawObject();\r\n        if (angular.isUndefined(thing.stateMap) ) {\r\n          throw new Error('Control statemap is not defined');\r\n        }  \r\n      ...\r\n    }]);\r\n\r\n on the index.ng.html, I have:\r\n \r\n    <master-control name=\"test_switch\"></master-control>\r\n\r\nAs per the tutorial, in the Server code I have\r\n\r\n    if (Controls.find().count() === 0) {\r\n      var controls = [{\r\n          'name': 'chandelier_switch',\r\n          'enable': true,\r\n          'label': 'Chandelier',\r\n          'state': false,\r\n          'stateMap': {\r\n             ...  \r\n          }\r\n      }];\r\n\r\n    for (var i = 0; i < controls.length; i++)\r\n      Controls.insert(controls[i]);\r\n\r\nWhen I search for the control in Mongo using the console \r\n\r\n  db.controls.findOne({ name: \"chandelier_switch\"})\r\n\r\nI get the right object, so the server code inserted the control in the collection as expected, but in the controller code is not working, and the `var thing = $scope.control.getRawObject()` is not returning the database document.\r\nWhat am I missing?\r\n\r\nThank you for the great work you're doing, and any help you can provide.\r\n"}}