从零开始学习Sencha Touch MVC应用之十七

原创
2016/04/07 15:24
阅读数 27
现在,让我们在app/data/ 目录下建立news.json 文件,并且从Sencha Touch Press添加一些新闻消息:
[
    {
        "title": "Beyond jQuery: JavaScript Tools For The HTML5 Generation",
        "date": "November 09, 2011",
        "content": "One of the stated goals of HTML5, at least for some groups, is to replace the Flash plug-in, the gold standard for making sprites and letters dance across the screen."
    },
    {
        "title": "What Is the Best Mobile Platform for HTML5 Development?",
        "date": "November 10, 2011",
        "content": "The focus of the mobile world has turned to HTML5. Right now, HTML5 is positioning itself to be the No. 3 mobile platform behind Apple's iOS and Google's Android and we will see that evolution take place over the next couple of years."
    },
    {
        "title": "No Flash? No Problem",
        "date": "November 18, 2011",
        "content": "So what does the future hold for Flash? I imagine Flash eventually being used more as a creative tool than a delivery format. As Adobe continues to put more effort into exporting HTML5-ready assets from Flash Pro, it tells me the swf may be slowly dying for desktop, too."
    },
    {
        "title": "Adobe Flash Sites Rapidly Converted To HTML5 For iOS users",
        "date": "November 21, 2011",
        "content": "A developer using Sencha Touch reports that translating large existing websites built with Adobe Flash to HTML5 mobile sites accessible to iOS users can now be performed by 1 or 2 people in just three weeks."
    }
]

用列表来显示存储器的数据


下面我们将显示我们的新闻Next we’ll display our news.


打开HomeIndexView.js 并且田间新的连接:

html: '<a href="#News/index" class="menu-item">News</a>' +
      '<a href="#Home/about" class="menu-item">About</a>',


展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
打赏
0 评论
0 收藏
1
分享
返回顶部
顶部