优化 图片缓存html
localstrrageios
插件git
https://github.com/paveisistemas/ionic-image-lazy-loadgithub
https://github.com/sunsus/ngImgCache缓存
https://github.com/sunsus/ngImgCache/blob/master/ngImgCacheIonic.js服务器
ionic的页面之间的跳转, 用href="#/tab/index", href="#/shop" ,要注意那个tabapp
同属于tab的页面或则其余同类型的页面之间跳转才有动画.ionic
service.js 里面放全局的函数和变量,并负责与服务器端通讯.ide
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模板里的函数是不能直接写变量的