user3759260
user3759260

Reputation: 19

Onsen-ui and angularjs $routeParams

in trying to transform a web app created with pure angularjs in an iphone/android app using onsen-ui.

My problem is that i use $routeParams in various page in the system:

Es.

    .when('/request_details/:request_id',
    {
            templateUrl: 'RequestDetailsControllerView.html'
    })
    .when('/wizard_request/:service/:request_id',
     {

        templateUrl: 'WizardOfferController.html'
    })
    .when('/wizard_request/:service',
     {

            templateUrl: 'WizardOfferController.html'
    })

So i need to pass it to my controller with the onsen-ui navigator command

ons.navigator.pushPage('page2.html')

It's possible to do it without change my controllers so i can maintain the same structure?

Upvotes: 1

Views: 1315

Answers (1)

Ataru
Ataru

Reputation: 544

I think the way to adopt ngRoute is not mainly supported by Onsen UI. If you want to use ngRoute, you can create application with pure AngularJS and ngRoute. So, if you use Onsen UI, I think that you had better follow the page transition way Onsen UI provide.

http://onsenui.io/guide/components.html

Upvotes: 1

Related Questions