typescript 将数据从一个页面传递到另一个页面(来源:来自'Ionic-Feed'项目)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript 将数据从一个页面传递到另一个页面(来源:来自'Ionic-Feed'项目)相关的知识,希望对你有一定的参考价值。

...
import { NavController, NavParams } from 'ionic-angular'; // <-- NavParams needed to pass data between pages
...
...

@Component({
  selector: 'page-detail',
  templateUrl: 'detail.html',
})
export class DetailPage {

  // Get data passed from HomePage
  key: string = this.navParams.get('$key');
  title: string = this.navParams.get('title');
  body: string = this.navParams.get('body');
  timestamp: string = this.navParams.get('timestamp');
  authorId: string = this.navParams.get('authorId');
  authorName: string = this.navParams.get('authorName');
  authorEmail: string = this.navParams.get('authorEmail');
  authorPhoto: string = this.navParams.get('authorPhoto');
  
  constructor(public navCtrl: NavController, public navParams: NavParams) {
    // Listen for new data on this subject
    ...
    ...
  }
}

以上是关于typescript 将数据从一个页面传递到另一个页面(来源:来自'Ionic-Feed'项目)的主要内容,如果未能解决你的问题,请参考以下文章

将数据从页面传递到另一个页面

使用 header() 将数据从一个 PHP 页面传递到另一个页面

将来自服务器的数据从一个页面传递到另一个页面,而不使用表单

使用 java servlet 将数据从一个 html 页面传递到另一个页面

Laravel 将数据从一个视图传递到另一个视图

如何通过使用 node.js 和 express 的 onclick 将数据从一个页面传递到另一个页面?