The pup wants your attention, and she wants to play. To stop this behavior there are two things that you must dol. First, if she does not have a crate or small area where she can be confined then get her one or make her one. When she begins the biting, chase game immediately take her to her area and confine her, or crate her. It will not take long for her to realize that when you don't want to play she will be left alone in her crate. Be consistant, and whenever she starts biting your pants legs or nipping, crate her or confine her immediately you don't have to leave her for more than 10 or 15 minutes.
Second, when you are playing with your pup never allow her to bite on your hands and use them as a chew toy. The first time she tries it stop playing. She will very soon get the message that biting or nipping you means that the playtime ends.
It may help to get her a variety ot toys and fnd some she likes, there are lots of different kinds, some that make noise, some that are just good for chewing, some that you can even put food in. Once she has stopped the nipping and biting you can redirect her energy with some toys, but untl the biting behavior stops, the toys are only for playtime, and stop if she nips.
Best of luck to you.