The unhappiness of the tantrum was her consequence, compounded by its failure to control you or change your mind. You may have to live through a few more, since they are common in tired, hungry, or overstimulated toddlers.
It helped, when I took my daughter or grandson anywhere at that age, to chat with them in advance what we'd be doing, and whether or not there would be a treat at some point. These were always 2-way conversations, in which I'd ask the child how she/he was going to participate, in age-appropriate language/concepts, of course. It worked well.
Empathy is also helpful. If the child knows you care about his/her despair and disappointment, and you can help give him/her the language to talk about feelings, the total collapse of control becomes less necessary.
But occasional melt-downs can still happen. Be strong!