NativeScript 插件 nativescript-observable-subscribe

码农软件 · 软件分类 · NativeScript 插件 · 2019-04-29 10:43:00

软件介绍

nativescript-observable-subscribe 是一个能添加订阅功能到 observables 的 NativeScript 模块。

使用:

// viewmodel.js
    ...
    var mainViewModel = new HelloWorldModel();
    var counterPropName = 'counter';
    mainViewModel.subscribe(counterPropName, function(args){
        if (this.get(counterPropName) <= 0) {
            this.set(messagePropName, "Hoorraaay! You unlocked the NativeScript clicker achievement!");
        }
        else {
            this.set(messagePropName, this.get(counterPropName) + " taps left");
        } 
    }, mainViewModel);
    exports.mainViewModel = mainViewModel;


本文地址:https://codercto.com/soft/d/4631.html

从零开始学C++程序设计

从零开始学C++程序设计

编者:吴惠茹 / 机械工业 / 2017-05-01 / 69.0

一起来看看 《从零开始学C++程序设计》 这本书的介绍吧!

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具