Hi and
to the forum.
You can extend the working life of the battery by charging it before use rather than after use, as this way it doesn't remain in a fully charged state for long. Check out
this post for more information on charging and extending your battery's lifespan.
As long as the power to the controller is turned off it
(and the battery has a separate charging connector) it should be fine to charge the battery while it is still plugged in.
Charging the battery with the power to the controller turned on would not cause a problem, and it would only take a fraction longer to fully charge due to the small amount of current being drawn by the controller, but it is always better
(and also much safer) to turn off the controller when it is not being used.
Alan