The Astros’ rebuilding plan was on display in two venues Thursday night – at the Major League Baseball draft in New York and before 24,672 at Minute Maid Park – and both offered cause for optimism.

Houston selected California high school lefthander Brady Aiken with the first pick of the draft, and its young lineup converted strong middle-inning bullpen work in relief of starter Brad Peacock and key eighth-inning hits by Jose Altuve and George Springer into an 8-5 win over the Angels.

By closing out a 4-3 homestand and taking two of three from the Angels, the Astros are 26-35 and are in single digits under .500 — a distinction they did not achieve last year after April 29.

They have shown, with nine wins in their last 12 games, that they can be ingenious, opportunistic, patent, adventurous and, on occasion, victorious.

“It’s no secret we’ve been playing better baseball with guys like (George) Springer and (Jon) Singleton coming up,” Altuve said. “They are doing the job, the pitchers are tremendous, we’re playing really good defense and it seems like we’re putting the team together.

“This is something we’ve been working toward, working hard to be a winning team.”

Held to seven singles through seven innings and clinging to a 4-3 lead, the Astros converted four walks surrendered by Angels reliever Cam Bedrosian into a four-run eighth.

Bedrosian walked Chris Carter, who had a career-high four of the Astros’ eight walks, to open the inning. Pinch runner Jonathan Villar was caught stealing, but Bedrosian walked Robbie Grossman, Carlos Corporan and Dexter Fowler.

Bedrosian was lifted for Fernando Salas, who gave up Altuve’s two-run double and Springer’s two-run single.

The Angels, however, battled back in the bottom of the ninth. They loaded the bases off Paul Clemens, the fourth of five relievers who followed Peacock (2-4), with base hits by David Freese and Chris Iannetta surrounding Singleton’s error.