Ianis Hagi showed great composure to put defending champions Rangers 1-0 up against Livingston on the opening day of the Scottish Premiership.