I have a subform that is shared among multiple views in my app. In one view, this subform is displayed alone with a back/continue button at the bottom that leads the user to
If it's a sub-form you can just move the form-tag from the sub-form and into the main-form: updated JSFiddle
You could also nest your forms using the ngForm-directive:
In angular forms can be nested. This means that the outer form is valid when all of the child forms are valid as well. However browsers do not allow nesting of elements, for this reason angular provides ngForm alias which behaves identical to but allows form nesting.
The result is a bit messy imo. I'd rather create a 'myForm'-directive with a new scope to avoid using $parent - something like:
myApp.directive('myForm',function(){
return{
restrict:'E',
scope:{model:'='},
templateUrl:'/form.html',
replace:true
}
});
- see this JSFiddle example