Some aspects of this disclosure relate to a method of treating an opthalmic disease affecting an eye of a patient comprising forming a covalently-crosslinked hydrogel in situ at a peri-ocular, intra-ocular, or intra-vitreal site for controlled release of a therapeutic agent.