how to work with multiple query string ?
- "#/?car=yes">With Params
- "#/">No Params
- var myApp = angular.module('myApp', []);
- myApp.config(function ($routeProvider) {
- $routeProvider.when('/', {
- template: '
Params Example
car: {{car}}
', - controller: indexCtrl
- });
- });
- function indexCtrl ($scope, $routeParams) {
- console.log('1');
- if ($routeParams.car) {
- $scope.car = $routeParams.car;
- } else {
- $scope.car = 'Not Provided';
- }
- }
Madhanmohan DevarajanPosted May 3, 2017, 9:37 AM