AngularJSURL参数传递问题

在App.js中定义参数名称

state("merchantProductEdit",{
		url : "/merchantProductEdit/:viewType/:merchantProduct",
		templateUrl : "module/merchantProduct/merchant_product_edit.html",
		controller : "merchantProductEditController"
	})






在controller里面去获取参数


backuser.controller('merchantProductEditController', function($scope, $http, $stateParams, merchantProductEditService, merchantProductListService, fileReaderUtil, backUserUtil, ouser) {
	$scope.viewType = $stateParams.viewType;
	$scope.vm.id = $stateParams.merchantProduct;
	$scope.uploadPdfDisabled = false;



你可能感兴趣的:(AngularJS)