-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
Description
I might be misunderstanding the purpose of canReuse, but I am noticing that my component is not recreated from scratch when navigating back to it by route. The radio button retains its value when returning. It was my impression that canReuse with a return value of false would recreate the entire component - DOM and all....?
Template
<input #male name="gender" type="radio" value="Male" (click)="gender = male.value" />
TypeScript
canReuse(next: ComponentInstruction, prev: ComponentInstruction) { return false; }
Code:https://github.com/thelgevold/angular-2-samples/blob/master/demo-page.ts
Demo: http://www.syntaxsuccess.com/angular-2-samples/#/demo/input
Steps to reproduce
- Select a gender
- Navigate away to a different component
- Navigate back and observe that the selected gender from step 1) is retained despite canReuse returning false
Reactions are currently unavailable