Giter Club home page Giter Club logo

blog's Issues

Questions and answers when developing ionic app.

Ionic: http://ionicframework.com/


  • Q: How to clean cache of views when change the language?
  • A: Use $ionicHistory.clearCache(); to clear the cache of history.
    clearCache: Clears out the app's entire history, except for the current view.

  • Q: ion-slide-box can not display images when using ajax to get the image list?
  • A: We can add ng-init attribute to ion-slide and then update the slide box with:
$ionicSlideBoxDelegate.$getByHandle('image-viewer').update();



  • Q: How to open an external link?
  • A: Use cordova-plugin-inappbrowser plugin:
ionic plugin add cordova-plugin-inappbrowser

and then use:

<a href="{{url}}" onclick="window.open(this.href, '_system', 'location=yes');return false;">url</a>

  • Q: How to show exit pop when the page is home, other pages go history back?
  • A: Use registerBackButtonAction to listen the back button action:
$ionicPlatform.registerBackButtonAction(function () {
    if ($ionicHistory.currentStateName() === 'app.home') {
        $scope.showExit();
    } else {
        navigator.app.backHistory();
    }
}, 100);

CentOS 部署打包 ionic android apk

  • 安装 nodejs
curl --silent --location https://rpm.nodesource.com/setup | bash -

yum -y install nodejs 
  • 安装 ionic 和 cordova
npm install ionic -g
npm install cordova -g
  • 安装 java8 和 android sdk
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm"

rpm -ivh jdk-8u45-linux-x64.rpm

wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz

tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
./android update sdk --no-ui

2015年阅读书籍

  • 《何以笙箫默》——顾漫
  • 《面包树上的女人》——张小娴
  • 《解忧杂货店》——东野圭吾
  • 《现在的泪,都是当年脑子进的水》——马兴华
  • 《乖,摸摸头》——大冰
  • 《他们最幸福》——大冰
  • 《追风筝的人》——胡塞尼
  • 《自我激励的100种方法》——史蒂夫.钱德勒
  • 《创造财富的100种方法》——史蒂夫.钱德勒
  • 《三体》——刘慈欣
  • 《水是最好的药》——巴特曼
  • 《虚无的十字架》——东野圭吾
  • 《一千零一夜》——方平
  • 《创业小败局》——创业家
  • 《无声告白》——伍绮诗

Issue with Angular UI grid - expandable all row (Sub grids)

I have a grid that has expandable rows and each row when expanded shows a sub grid. But the rendering of the sub grids is taking too much of time, even when there are only 50 rows and when i execute expand all rows. Using the bellow method
$scope.gridApi.expandable.toggleAllRows();

My understanding is some of the subgrid columns are having cell templates, which is causing the excess rendering time.

Any suggestion or some psuedo code would b really helpful .

Ubuntu add proxy user for ssh proxy.

Server side

  • Add proxy user:
sudo useradd -m proxy
  • Create an id_rsa key, will create id_rsa and id_rsa.pub files:
ssh-keygen
  • Add authorized_keys:
sudo mkdir /home/proxy/.ssh
sudo cp id_rsa.pub /home/proxy/.ssh/authorized_keys
sudo chown -R proxy.proxy /home/proxy/.ssh
  • Disable the login of proxy user:
sudo vi /etc/passwd

Add /bin/false to proxy line:

proxy:x:1002:1002::/home/proxy:/bin/false

Client side

  • Add config:
host proxy 
    HostName server_ip
    User proxy
    IdentityFile ~/.ssh/proxy/id_rsa
  • Test config:
ssh proxy

and it will return Connection to server_ip closed.

Sorting issue in case of a inner table

Hi ,
I am using the bootstrap table plugin. And in my requirement I have a inner table inside a given table. The inner table and the parent table are both bootstrap table . The issue I am facing is - when i try to sort the inner table the sort function for both the inner table and the parent table gets triggered, as a result the inner table collapses .

I feel this is happening because of these below lines of code

this.$container.off('click', '.th-inner').on('click', '.th-inner', function (event) {
if (that.options.sortable && $(this).parent().data().sortable) {
that.onSort(event);
}
});

table view

On clicking on the inner table header, the inner table collapses. Its because the sorting for the parent table gets fired

after collapse

This being a very critical issue , would really appreciate your inputs.

图标

兄台blog上express图标换了吧。。。。

Questions and answers with common css.

Q: How to turn off number input spinners?

A: WebKit desktop browsers add little up down arrows to number inputs called spinners.We can turn them off visually like this:

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

Add auto update.

  • Add webhook to auto update the blog and build the list when git commit.
  • Add crontab event to auto update the analytics information every day.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.