定义路由
.state(‘txnresult’, { 
url: ‘/txnresult/:originAmount/:finalAmount/:currentPoint/:txnId/:discountAmount’, 
templateUrl: ‘templates/txnresult.html’, 
controller: ‘TxnResultCtrl’ 
})

基本参数: 
‘/user/:id’ 
‘/user/{id}’ 
‘/user/{id:int}’

使用正则表达式: 
‘/user/{id:[0-9]{1,8}’ 
//匹配所有以user开始的url 并将剩余参数传给id 
‘/user/{id:.*}’ 
‘/user/*id

传递参数方式1
href=”#/txnresult/{{originAmount}}/{{finalAmount}}/{{currentPoint}}/{{txnId}}/{{discountAmount}}”

传递参数方式2
$state.Go(‘txnresult’,{originAmount: d.result.originAmount,finalAmount: d.result.finalAmount,currentPoint: d.result.currentPoint,txnId: d.result.txnId,discountAmount: d.result.discountAmount});

获取参数
$scope.originAmount = $stateParams.originAmount; 
$scope.finalAmount = $stateParams.finalAmount; 
$scope.currentPoint = $stateParams.currentPoint; 
$scope.discountAmount = $stateParams.discountAmount; 
$scope.txnId = $stateParams.txnId;

AngulaJS路由 ui-router 传递多个参数的更多相关文章

  1. angularjs的路由ui.router

      <!-- 引入路由插件 --> <script src="vendor/angular-ui-router/release/angular-ui-router.min. ...

  2. element ui change 传递带自定义参数

    @change="((val)=>{changeStatus(val, index)})" https://www.cnblogs.com/mmzuo-798/p/10438 ...

  3. angular ui.router 路由传参数

    angular已经用了一段时间了,最近在做路由,做一下笔记. 路由跳转的时候进行穿参 ui.router方式 <a ui-sref="edit({id:5})"> 编辑 ...

  4. vue 中 this.$router.push() 路由跳转传参 及 参数接收的方法

    传递参数的方法:1.Params 由于动态路由也是传递params的,所以在 this.$router.push() 方法中 path不能和params一起使用,否则params将无效.需要用name ...

  5. Vue编程式路由跳转传递参数

    Vue 有时在路由跳转时需要用到一些原页面里的数据,用以下方法: 1.在跳转页的方法里写下query参数 TableChange(scope){ this.$router.push({ path:'d ...

  6. Django路由系统---django重点之url传递一个默认参数

    django重点之url传递一个默认参数 可以利用这个特性,让2个URL映射一个函数,但是返回2个不同的HTML url(r'default_param1', views.def_param,), u ...

  7. angular路由——ui.route

    angular路由 使用案例 <!DOCTYPE html> <html lang="en"> <head> <meta charset= ...

  8. 【原创】ui.router源码解析

    Angular系列文章之angular路由 路由(route),几乎所有的MVC(VM)框架都应该具有的特性,因为它是前端构建单页面应用(SPA)必不可少的组成部分. 那么,对于angular而言,它 ...

  9. angular 4 router传递数据三种方法

    1.在查询参数中传递数据 <a  [routerLink]="['/product']" [queryParams]="{id:1,name:'dongian'}& ...

  10. ngRoute 与ui.router区别

    angular路由 路由 (route) ,几乎所有的 MVC(VM) 框架都应该具有的特性,因为它是前端构建单页面应用 (SPA) 必不可少的组成部分. 那么,对于 angular 而言,它自然也有 ...

随机推荐

  1. Python基础(二)之字符串

    字符串在python语言中极为常用,下面就带大家来一起回顾一下字符串常用的方法: 1.count 作用:统计字符串中字符的个数 例: str_yu = 'xiAoyuhaha' print(str_y ...

  2. TensorFlow中权重的随机初始化

    一开始没看懂stddev是什么参数,找了一下,在tensorflow/python/ops里有random_ops,其中是这么写的: def random_normal(shape, mean=0.0 ...

  3. Android EditText输入格式设置

    在开发的过程中,通常会用到EditText,如何让虚拟键盘来适应输入框中内容的类型,通常我们都会在xml文件中加入android:inputType="". android:inp ...

  4. 使用C#进行图像处理的几种方法(转)

    本文讨论了C#图像处理中Bitmap类.BitmapData类和unsafe代码的使用以及字节对齐问题. Bitmap类 命名空间:System.Drawing 封装 GDI+ 位图,此位图由图形图像 ...

  5. 使用Spring+Junit4.4进行测试(使用注解)

    http://nottiansyf.iteye.com/blog/345819 使用Junit4.4测试 在类上的配置Annotation @RunWith(SpringJUnit4ClassRunn ...

  6. jQuery的编码标准和最佳实践

    不知道在哪里看到了这篇关于jQuery编码的文章,挺实用的,恰好最近在研究jQuery的基础知识,今天打开收藏夹来翻译一下,原文的英语不难,但是内容很实用,可能有大神已经翻译过了,大家看精华就行了. ...

  7. 前后台读取Web.config中的值的方法

    webconfig <configuration> <appSettings> <add key="Workflow_Url" value=" ...

  8. petapoco存储过程

    db.ExecuteScalar<string>("exec P_GetCode @0,@1,@2,@3,@4,@5",); using (var db = new D ...

  9. Delphi系统变量:IsMultiThread对MM的影响

    前几日,调试一BUG,过程先不说,最后调试到MM,即Debug dcu,然后进入到GetMem.inc中的Get/FreeMem函数处后,出现AV. 然后一通找...郁闷了N天,后来发现将MM切换到Q ...

  10. JAVA 通过LDAP获取AD域用户及组织信息

    因为工作需求近期做过一个从客户AD域获取数据实现单点登录的功能,在此整理分享. 前提:用户可能有很多系统的情况下,为了方便账号的统一管理使用AD域验证登录,所以不需要我们的系统登录,就需要获取用户的A ...