zoukankan      html  css  js  c++  java
  • ionic webapp

    优化 图片缓存

    localstrrage

    插件

    https://github.com/paveisistemas/ionic-image-lazy-load

    https://github.com/sunsus/ngImgCache

    https://github.com/sunsus/ngImgCache/blob/master/ngImgCacheIonic.js

    ionic的页面之间的跳转, 用href="#/tab/index", href="#/shop" ,要注意那个tab

    同属于tab的页面或则其他同类型的页面之间跳转才有动画.

    service.js 里面放全局的函数和变量,并负责与服务器端通信.

    controller.js 负责把service取得的数据分配到模板里, 这里面是每个模板对应一个控制器, 函数可以写在它的控制器,如$scope.fly=function(){};

    app.js组织所有的模板, 还有每个页面的路径

        .state('tab.groupbuy', {
          url: '/groupbuy',
          views: {
            'tab-groupbuy': {
              templateUrl: 'templates/tab-groupbuy.html',
              controller: 'GroupBuyCtrl'
            }
          }
        })
        /*
        .state('citys', {
          url: "/citys",
          controller: 'CitysCtrl',
          templateUrl: "templates/citys.html"
        })
    */
        .state('shops', {
          url: "/shops/:categoryId",
          controller: 'ShopsCtrl',
          templateUrl: "templates/tab-shops.html",
          animation: 'slide-left-right-ios7'
        })
    
        /*
        .state('market', {
          url: "/market/:marketId",
          controller: 'MarketCtrl',
          templateUrl: "templates/market.html",
          animation: 'slide-left-right-ios7'
        })
    
        .state('markets', {
          url: "/markets/:markettype",
          controller: 'MarketsCtrl',
          templateUrl: "templates/markets.html",
          animation: 'slide-left-right-ios7'
        })
    */
        .state('shopdetail', {
          url: "/shopdetail/:shopId",
          controller: 'ShopdetailCtrl',
          templateUrl: "templates/tab-shop.html"
        })

     state里面的路径才是 在location.href=""里面应该用的,不过 . 要换成 /

    ionic模板里的函数是不能直接写变量的

  • 相关阅读:
    SQLite 与 SqlCE 比较
    window.showModalDialog以及window.open用法简介
    Flex 3D Engine演示 帅呆了。
    MySQLFront
    数据库复制相同表语句
    org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
    PHP中全局变量$_SERVER的详细用法
    PHP date函数使用说明
    如何学习Flex Framework
    richfaces a4j标签帮助文档 地址
  • 原文地址:https://www.cnblogs.com/whuper/p/4205972.html
Copyright © 2011-2022 走看看