I am doing a SPA. I am using ngResources and I have a really simple form.
User can compile it and after he submit the form should appear a new form with only a message that says something like this: "Thank you to use our form ..."
I would like to avoid something like
$("#myForm").hide();
$("#myMessage").show();
because I think it is not the correct way to manage views in angular. I think I should use routing... Honestly I don't know...
In this moment I am using ngSwitch. I think ngSwitch is worst than using jQuery because ngSwitch change the scope of the view. So my model change from
<input data-ng-model="MyProp" ... />
to
<input data-ng-model="$parent.MyProp" ... />
I don't want to fill my form with $parent
. I think it does not make sense in this context.
Which is the correct way to change view after in angularJs?
Thank you