TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
tri_inn
NA
1.2k
235.2k
AngularJS: How to pass multiple querystring to controller
May 2 2017 9:51 AM
how to work with multiple query string ?
<a href=
"#/?car=yes"
>With Params</a>
<a href=
"#/"
>No Params</a>
<div ng-view></div>
var
myApp = angular.module(
'myApp'
, []);
myApp.config(
function
($routeProvider) {
$routeProvider.when(
'/'
, {
template:
'<div flash></div><h3>Params Example</h3><p>car: {{car}}</p>'
,
controller: indexCtrl
});
});
function
indexCtrl ($scope, $routeParams) {
console.log(
'1'
);
if
($routeParams.car) {
$scope.car = $routeParams.car;
}
else
{
$scope.car =
'Not Provided'
;
}
}
Reply
Answers (
1
)
match condition in array list using angularjs
Fire function from one to another controller