GIS-項目總結

GIS項目主要用的是Flatify框架,能很好的和bootstrap,UIbootstrap,AngularJS結合起來使用.html

網站學習:

  1. 能夠打印出漂亮的可摺疊的josn格式插件(須要引用js,還有依賴項):http://azimi.me/json-formatter/demo/demo.htmlgit

  2. 基於h5的拖拽效果插件(須要引用js,還有依賴項):https://github.com/marceljuenemann/angular-drag-and-drop-listsgithub

  3. 也是拖拽排序效果並支持觸屏(須要引用js,還有依賴項):https://github.com/a5hik/ng-sortable;
  4. 齊全的angular-filter(學習):https://github.com/a8m/angular-filterjson

  5. encodeURIComponent():將字符串轉換成url識別的編碼;eg:encodeURIComponent(angular.toJson(exportExcel));bootstrap

  6. 圖表:https://github.com/develersrl/angular-flot因爲flatify這個框架中的圖表可能有點bug,不支持動態生成,因此找的這個庫;

學到的一些簡單用法:

  • filter的unique用法:能夠根據數組中鍵名稱篩選出整個數組中此鍵不重複的對象組成的數組:$filter('unique')(data,'groupname');【max用法於此相似】
  • copy:angular.copy($scope.all,$scope.empty);此方法與直接等於有點區別,個人理解,等於,二者的值會相互改變影響,copy不會;
  • 對象循環:angular.forEach(object,function(val,key){})
  • 本地刪除數組中的對象:
    var index=$scope.mp.indexOf(item);
    if(index!=-1){
    $scope.mp.splice(index,1);
    }
  • 刪除對象中的變量:delete data.create;
  • 在angularJs裏的頁面跳轉用$location.path('/#xxx');ionic中的頁面跳轉用state.go();
  • 頁面跳轉:當前頁面使用$location.path()時候裏邊是沒有參數的;
  • concat()方法數組鏈接;
  • $scope.$on/$emit(上級)/$broadast(下級);
  • array.join(',');array是字符串數組,join()能夠使字符串數組轉化爲字符串並用','鏈接起來;
  • array=$filter('map')(array,fieldName);將對象數組filter爲字符串數組;

遇到的錯誤提示:

  1. track by問題:
相關文章
相關標籤/搜索