1. A bracket device configured to mount a slide rail assembly to a post, the bracket device comprising:a bracket having a first engagement part;
a hook connected to the bracket of the bracket device and located at a close position relative to the bracket of the bracket device; and
a locking element operatively engaged with the first engagement part of the bracket of the bracket device for abutting against the hook to hold the hook at the close position;
wherein the slide rail assembly comprises an extension element connected to the locking element;
wherein the locking element has a first guiding part, the slide rail assembly further comprises a connection element passing through part of the first guiding part for connecting the locking element to the bracket of the bracket device;
wherein when the locking element is operatively disengaged from the bracket of the bracket device, a supporting feature of the locking element no longer abuts against a first leg of the hook, and the hook is no longer held at the close position relative to the bracket of the bracket device.