跳至主要内容

博文

目前显示的是 2015的博文

meteor, angular, react which to chose to create a website

What I need I don't want to design the ui. So I need to chose a framework which is a implementation of material design . I want to use of framework with router , better with lazyload . I want to build a prototype as fast as I can. So, there are the choices: meteor, angular and react. [Dis]Advantages Meteor x  no material design, can be fixed using materialize, but not good as material.angular √ iron-router, it's great √ meteor is very easy to use as well as db handler. Angular √ material.angular, Great to use, best implement if there is no polymer √ lots of router implementation, hard to use if with lazyload √ easy to handler frontend, backend need support from express or koa or others, little hard for me. React √ material-ui, good to use, no enough component as material.angular √ with router √ Great idea of data flow(flux + react), you can develop with es6 and many great feature of modal js. Conclusion meteor is the easiest to use a...

页面加载问题

今天了解了一些有关页面加载的问题,本来想做一个loading-bar类似于(nprogress或pace),原来用angular的intercepter实现过一个,但只能用来记录angular中$http的请求状态,记得以前还看过一个源码好像是通过在XMLHTTPRequest上封装了一层操作,来记录并显示请求状态的,本来想看看怎样结合两者做一个更好用的loading,但在nprogress的文档中看到了turbolinks的加载方式,搜了一下发现,发现turbolinks是一个很叼的工具啊。。 turbolinks使用了pushState来加载内容,并把body和head替换到当前页面,并更新url,而且据说github和plus.google.com都采用了这种加载方法,难怪那么叼,我说怎么每次进入github项目的一个目录中时,它会开始加载但不跳转页面,当前页面还可以继续滚动或操作,加载完成之后才会跳转到新的页面去,真是叼叼的,然后果然又去看了下plus.google.com,同样叼叼的,而且发现google的router也很是强大,是动态加载的,而当某一个路由下的文件加载完成之后,再切换到其他路由然后再切换回来是不需要再加载文件的,动态的页面,应该是只是刷新内容即可,和我以前看的ui-router的一个懒加载很像,叫做ui-router-extra,mark下,以后也许会用得到 Reference turbolinks turbolinks介绍 pjax  介绍pjax和push state ui-router-extra  可以实现ui-router的lazy-load

常用快捷键

Mac下快捷键 注:以下Ctrl用C表示Alt用A表示mac键用M表示Shift用S表示。。 terminal C+a, 行首 C+e, 行尾,这两个基本上是最常用的了 C+w, 向前删除一个单词 C+k, 从光标处删除到行尾 M+S+[, 向左切换标签窗口 M+S+], 向右切换标签窗口