ionic页面跳转传值 ng-click

母页:加入$state

<button  class="button button-calm button-block" ng-click="toProducer(producerId)" style="padding: 0 50px; background-color:#12B7F5;" >
 &nbsp核&nbsp&nbsp&nbsp&nbsp&nbsp查&nbsp
</button>
ng-click="toProducer(producerId)"

母页控制器:
 $scope.toProducer = function () {
         var tid = document.getElementById(‘taskid‘);
         var  TaskId = tid.textContent;
        $state.go(‘main.td‘, {producerId:TaskId});

    };

APP.js

.state(‘main.td‘,{
    url:‘/td/:producerId‘,
    views:{
        ‘main-kssb‘:{
           templateUrl: ‘templates/kssb/td.html‘,
           controller: ‘TbCtrl‘
        }
    }
})

子页控制器:$state $stateParams

var TaskId = $stateParams.producerId;

$stateParams.producerId:获取母页传入的值

 
时间: 2024-08-25 06:09:38

ionic页面跳转传值 ng-click的相关文章

iOS 页面跳转传值,属性传值,代理传值,代码块传值,单例传值,通知传值

有时候我们在页面跳转的时候回传递相应的参数,如,你想把在第一个页面的文本框里的内容显示在第二个文本框中,或者你又想把第二个文本框中的内容改变之后到第一个页面的文本框中,所有,这个时候我们就要用到页面跳转传值 1.属性传值(正向传值) 属性传值是正向传值,只可以从前面一个页面传递到第二个页面,不可以从第二个页面传递到第一个页面 2.代理传值(逆向传值) 代理传值是逆向传值 代理传值步骤 代理传值 适用于 反向传值 1.1 创建协议 及协议方法 在反向传值的页面(SecondViewControll

PHP页面跳转传值的三种常见方式

一. POST传值 post传值是用于html的<form>表单跳转的方法,很方便使用.例如: ? 1 2 3 4 5 6 7  <html>  <form action='' method=''>  <input type='text' name='name1'>  <input type='hidden' name='name2' value='value'>  <input type='submit' value='提交'>  

页面跳转传值接收

遇到一个问题,有一个页面A,页面B和页面C都能跳转到页面A,然后页面B需要传值到页面A,执行函数取到后台数据,而从页面C进入就不需要,然后问题就来了 C1 = window.location.href.split("?")[1]; C2 = C1.split("=")[1]; 页面A的js这样写确实能取到从页面B传来的数据,但是从页面C跳转的页面A中的split没有定义,调整了几种接收方式都没有用,最后用的是判断页面来源网址来判断的函数是否执行 $(function

.Net中几种常见的页面跳转传值方法

1.ASP Server对象Execute方法 ASP Server对象的Execute方法可以在执行当前页面的过程中将另一个页面执行结果的内容插入到当前页面的输出中.Execute方法带一个参数,是个字符串,指定要执行的ASP文件的位置.如果提供了绝对路径,这个路径则必须位于同一个应用程序空间中.Execute方法提供了一种服务器端包含的替代方法,并且允许使用者开发自己的可重用模块集合,作为简单的脚本页.传递给主调ASP页面的参数从被执行页中可以得到.被执行页产生的所有输出都被添加到主调页产生

小程序-页面跳转传值的方法

比如从index.wxml跳转到aaa.wxml index.wml页面 <navigator url = "../aaa/aaa?id=1" ></navidator>  //传到aaa.wxml的时候传过去的值为id=1,则需要在aaa.wxml 的js获取到id=1 aaa.js页面 Page({  data: {      id:''   },  onLoad: function (options){     var that = this;     t

Vue + ElementUi 页面跳转传值的方法

跳转的页面(接收):      跳转的页面(接收): 原文地址:https://www.cnblogs.com/panyw/p/8175781.html

微信小程序——页面跳转传值

比如从index.wxml跳转到aaa.wxml index.wml <navigator url="../aaa/aaa?id=1" > </navigator> 传到aaa.wxml的时候传过去的值为id=1,则需要在aaa.wxml 的js获取到id=1 aaa.js Page({ data: { id:'' }, onLoad: function (options){ var that = this; that.setData({ id: options

Intent实现页面跳转和传值

*Intent称为意图,是Android各大组件连接的桥梁 1.Activity页面跳转 Intent intent = new Intent(); intent.setClass(MainActivity.this, SecondActivity.class); MainActivity.this.startActivity(intent); 2.Activity页面跳转传值 第一种方法: 发送方: Intent intent = new Intent(); intent.putExtra("

使用storyboard实现页面跳转,简单的数据传递

在storyboard中,界面的跳转是通过segue来实现的,利用它,省去了方法内写入跳转的代码. 一 视图跳转 <StoryBoard下的视图跳转> 我们知道:segue共有三种类型:push,modal,和custom.如下图://01 简单说下这三个的作用:使用导航栏压进新的控制器(push),模态的加载视图控制器(modal),自定义(custom). 好了,废话少说,现在开始我们的旅行. 1,首先建立一个Single View 模板的项目,记得勾选上storyboard.然后打开它,