I'm new to AngularJS, so forgive me if this is obvious, but I'm looking for someone who can answer this difficult question. I am implementing an application and must pass some parameters to a specific view in order to display information about the book. Basically, I would like to be able to use the following routing expressions:
bookApp.config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/catalog', {
templateUrl: 'cataloglist.htm',
controller: 'catCtrl'
}).
when('/book/:title/:chapter', {
template: 'chapterdetail.htm',
controller: 'chapterCtrl'
}).
otherwise({
template: 'oops ... do not understand that route',
});
}]);
The expression /book/:title/:chaptershould allow me to convey the name of the title of the book. I expect that I can convey ANY title of any book. To make sure everything is properly bounded, I am going to URL-encode the value of the header, so that there will not be any slashes in the encoded value, and the value will be clearly limited by slashes. This is a common way to create URLs containing values.
, , (, The 3/5 solution). URL The+3%2F5+Solution. , URL-:
/app/
, , URL- , ! , , , . , .
REST-, URL- , URL- , . , URL-, :
app.jsp?title=The+3%2F5+Solution&chapter=The%20Beginning
. URL, . , ... , AngularJS.
%2F , , . -, . - ?. ( ) ?