I am trying to do a SPA using angular ui-router. This is my app.js
var productCatalogApp = angular.module('ProductCatalog', ['ui.router']);
productCatalogApp.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state('wizard', {
url: '/wizard',
templateUrl: 'WizardSubForm',
controller: 'WizardMainController'
})
.state('wizard.offer', {
url: '/offer',
templateUrl: 'OfferForm',
controller: 'OfferCtrlr'
})
.state('wizard.customizations', {
url: '/customizations',
templateUrl: 'OfferCustomizations',
controller: 'CustomizationCtrlr',
});
$urlRouterProvider.otherwise('/wizard');
});
The Url pattern in each state is the name of the action method. This is an action method that gets called when I click on OfferCustomizations.
public virtual ActionResult OfferCustomizations(string data)
{
OfferCustomization offerCustomization = new OfferCustomization();
offerCustomization.ProductCatalogApiUrl = ProductCatalogApiUrl;
return View(offerCustomization);
}
Now I want to send the object to an action method, but I do not know how to do it. Please, help.
source
share