ViewModel のチェーンに依存するプロパティの実際の例を持っている人はいますか? コード例は、私が話していることを説明します。
<script type="text/javascript">
    var ViewModel = function () {
        this.SelectedPubCode = ko.observable('@Model.PubCode');
        this.SelectedVersionName = ko.observable('@Model.VersionName');
        this.PubCodes = ko.observable(@Model.PubCodes.ToJavascriptArray());
        this.VersionNames = ko.observable(@Model.VersionNames.ToJavascriptArray());
        this.LoadVersionNames = function(pubCode) {
            var self = this;
            $.ajax({
                type: "POST",
                url: '@Url.Action("LoadVersionNames")',
                data: "pubCode=" + pubCode,
                success: function(data) {
                    self.VersionNames(data);
                    // Trigger chain call (will call SelectedVersionName subscribtion).
                    self.SelectedVersionName('');
                }
            }); 
        };
        this.SelectedPubCode.subscribe(function(newPubCode) {
            // Accessing public variable to call model's method
            model.LoadVersionNames(newPubCode);
        });
        this.SelectedVersionName.subscribe(function(newValue) {
            // Another model's method can be called here.
            alert("Version Name has been changed to '" + newValue + "'");
        });
    };
    // Creating public variable to access it from inside of subscribtion action
    var model = new ViewModel();
    ko.applyBindings(model);
</script>
this.SelectedPubCode.subscribe(function(newPubCode)コールを見てください。これを機能させるには、グローバル変数を使用する必要があります。私が望む動作を達成する他の方法はありますか?