Skip to content Skip to sidebar Skip to footer

States Angularjs $stateprovider Not Passing Arguments

I got a current angularjs application using the standard $routeProvider for routing. I intend to use a part of the application the $stateProvider for a wizard. I declared a parent

Solution 1:

You are not passing argument in state where you are defining your states you need to do something like this.

 $stateProvider.state('Modal', {
        views: {
            'modal': {
                templateUrl: '*urlHere*',
                controller: '*controllerHere'
            }
        },
        abstract: true
    });

    $stateProvider.state('Modal.editClient', {
       params: {
                        'id': 0
                },
        views: {
            "modal": {
                url: '/editClient/:id',
                templateUrl: '*templateHere*',
                controller: '*controllerHere*'
            }
        }
    });

Post a Comment for "States Angularjs $stateprovider Not Passing Arguments"