It is clear that AngularJS aims to develop SPA (single-page application). However, it is also possible to create an MPA application (multi-page application).
My application is based on several states using Angular libraries like ui-routerand ngResource. First I have a file index.htmlin which I load all the dependencies and ui-view. Then I have three different modules: one main module, which contains the top states, the first home page and loads all the necessary third-party modules. Another module is called Student and has a simple form for POSTsome data in our Django back-end.
The problem lies in the third module: the company module. Here we have two navigation bars: one top navigation bar, on which there is no content yet, and then a sidebar containing several buttons, for example, shown in the image:

At the moment, each of these buttons on the side panel displays the user in a different state, in which the image is loaded into the space where you can see "Welcome ..."
Basically, our states are defined as follows:
'use strict';
talentforce_company
.config(['$stateProvider', '$urlRouterProvider', 'eehNavigationProvider',
function($stateProvider, $urlRouterProvider, eehNavigationProvider) {
$stateProvider.state('companyState', {
url: '/company',
abstract: true,
template: '<company-area-directive></company-area-directive>'
});
$stateProvider.state('homeState', {
url: '/home',
parent: 'companyState',
controller: ['$scope', '$rootScope', function($scope, $rootScope) {
$rootScope.name_filter = "";
$rootScope.city_filter = "";
}
],
template: '<h3>Welcome to TalentForce company area home</h3>'
});
$stateProvider.state('select_study_areas', {
url: '/select_areas',
parent: 'companyState',
template: '<study-areas-directive></study-areas-directive>'
});
$stateProvider.state('TalentForceState_seeProfile', {
url: '/profile_list',
parent: 'companyState',
template: '<people-directive></people-directive>',
});
$stateProvider.state('student', {
url: '/profile/{personId}',
parent: 'companyState',
controller: 'Person_Controller',
template: '<profile-directive></profile-directive>',
resolve: {
student: function(student_service, $stateParams) {
return student_service.getStudents().find(function(student) {
return (student.student_id == $stateParams.personId);
});
}
}
});
eehNavigationProvider
.menuItem('TF_menu_top.users', {
text: 'USERNAME',
iconClass: 'glyphicon-user',
href: '#'
});
eehNavigationProvider
.menuItem('TF_sidebar.home', {
text: 'Home',
state: 'homeState',
iconClass: 'fa fa-home fa-fw',
})
.menuItem('TF_sidebar.profile', {
text: 'Company Profile',
href: '#',
iconClass: 'fa fa-building fa-fw'
})
.menuItem('TF_sidebar.students', {
text: 'Profiles',
state: 'select_study_areas',
iconClass: 'fa fa-users fa-fw'
})
.menuItem('TF_sidebar.posts', {
text: 'Job Posts',
href: '#',
iconClass: 'fa fa-list-alt fa-fw'
})
.menuItem('TF_sidebar.stats', {
text: 'Statistics',
href: '#',
iconClass:'fa fa-bar-chart fa-fw'
})
.menuItem('TF_sidebar.universities', {
text: 'Universities',
href: '#',
iconClass:'fa fa-university fa-fw'
})
.menuItem('TF_sidebar.tips', {
text: 'Tips',
href: '#',
iconClass: 'fa fa-check-square-o fa-fw'
})
.menuItem('TF_sidebar.events', {
text: 'Events',
href: '#',
iconClass: 'fa fa-calendar fa-fw'
})
.menuItem('TF_sidebar.help', {
text: 'Help',
href: '#',
iconClass: 'fa fa-question fa-fw'
})
}]);
, , , , navbars. . , URL-, , , . .
"", . , . , .
, . , "", , , . URL- - , : oursite.com/offers/?page=1&s=date&s_l=0&s_h=100&t_co=false&t_st=false&hd=false
URL-, . , , ( ), URL , - .
:
<form class="filters" id="myFormId" role="form">
<div class="col-sm-2" id="filter-column">
<div class="controls">
<select id="country" name="country">
<option value="all">All</option>
<option value="au">Australia</option>
<option value="br">Brazil</option>
<option value="ca">Canada</option>
<option value="fr">France</option>
<option value="de">Germany</option>
<option value="mx">Mexico</option>
<option value="nz">New Zealand</option>
<option value="it">Italy</option>
<option value="za">South Africa</option>
<option value="es">Spain</option>
<option value="pt" selected>Portugal</option>
<option value="us">U.S.A.</option>
<option value="uk">United Kingdom</option>
</select>
</div>
</div>
<div class="col-sm-2" id="filter-column">
<div id="locationField">
<input class="search" id="form-input" name="student_city" placeholder="Enter a city" type="text" />
</div>
</div>
, ( - URL) , .
, name, :
var queryString = $('#myFormId').serialize();
queryString , : country=pt&student_city=Montijo%2C+Portugal
, . JSON? Angular? , , ?
, , , . , ? , , , , , .