Q: Setting scope variable in controller is undefined If i set a scope variable like this it works just fine:
$scope.event = new Date();

but if i set this, i get an undefined error:
$scope.event.start.time = new Date();

Why and how can I set $scope.event.start.time?

A: With something like this:
$scope.event = {
  start: {
    time: new Date()
  }
};

Otherwise, as JS doesn't have auto-vivification, you'll attempt to access (set) a property of undefined.
