loading a knockout.js observableArray() from .ajax() call

后端 未结 5 1293
半阙折子戏
半阙折子戏 2021-02-01 20:10

This puzzles me. It must be something small I\'m not seeing. I\'m trying to load a very simple observableArray in knockout with an ajax call.

javasc

5条回答
  •  忘掉有多难
    2021-02-01 20:16

    This is bug I think, Knockout's sample is working when we use it with wrapper class:

    public class ResultWrapper
    {
        public Title {get;set;}
        public List {get;set;}
    }
    

    http://learn.knockoutjs.com/#/?tutorial=webmail

    But if we return Results directly there is no way to bind it. (without extra applyBindings!)

提交回复
热议问题