I'm using a SinglePage-Application with one controller and three ui-view templates inside. Here the HTML:
<div class="ng-scope" ng-controller="gameController">
<div ui-view="viewUser"></div>
<div ui-view="viewTeam"></div>
<div ui-view="viewGame"></div>
</div>
Here the Config:
function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise("");
$stateProvider
.state('index', {
url: "",
controller: 'gameController',
views: {
"viewUser": { templateUrl: "templates/user-template.html" },
"viewTeam": { templateUrl: "templates/team-template.html" },
"viewGame": { templateUrl: "templates/game-template.html" }
}
});
}
Each view contains a formular with a ng-submit-event, and when i want to submit, $scope.formName is undefined. How i can use "$scope.teamName.$valid" inside ui-view? Glad for any reply.