久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <i id='9OaYV'><tr id='9OaYV'><dt id='9OaYV'><q id='9OaYV'><span id='9OaYV'><b id='9OaYV'><form id='9OaYV'><ins id='9OaYV'></ins><ul id='9OaYV'></ul><sub id='9OaYV'></sub></form><legend id='9OaYV'></legend><bdo id='9OaYV'><pre id='9OaYV'><center id='9OaYV'></center></pre></bdo></b><th id='9OaYV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9OaYV'><tfoot id='9OaYV'></tfoot><dl id='9OaYV'><fieldset id='9OaYV'></fieldset></dl></div>
      <bdo id='9OaYV'></bdo><ul id='9OaYV'></ul>
    <tfoot id='9OaYV'></tfoot>

    <small id='9OaYV'></small><noframes id='9OaYV'>

    1. <legend id='9OaYV'><style id='9OaYV'><dir id='9OaYV'><q id='9OaYV'></q></dir></style></legend>

      1. 如何在 Ionic 框架中使用 ngCordova s??qlite 服務和

        How do I use the ngCordova sqlite service and the Cordova-SQLitePlugin with Ionic Framework?(如何在 Ionic 框架中使用 ngCordova s??qlite 服務和 Cordova-SQLitePlugin?)

          1. <small id='wvvBc'></small><noframes id='wvvBc'>

          2. <i id='wvvBc'><tr id='wvvBc'><dt id='wvvBc'><q id='wvvBc'><span id='wvvBc'><b id='wvvBc'><form id='wvvBc'><ins id='wvvBc'></ins><ul id='wvvBc'></ul><sub id='wvvBc'></sub></form><legend id='wvvBc'></legend><bdo id='wvvBc'><pre id='wvvBc'><center id='wvvBc'></center></pre></bdo></b><th id='wvvBc'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wvvBc'><tfoot id='wvvBc'></tfoot><dl id='wvvBc'><fieldset id='wvvBc'></fieldset></dl></div>
            <legend id='wvvBc'><style id='wvvBc'><dir id='wvvBc'><q id='wvvBc'></q></dir></style></legend>
              <bdo id='wvvBc'></bdo><ul id='wvvBc'></ul>

                <tbody id='wvvBc'></tbody>
                  <tfoot id='wvvBc'></tfoot>

                • 本文介紹了如何在 Ionic 框架中使用 ngCordova s??qlite 服務和 Cordova-SQLitePlugin?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我一直在嘗試將 sqlite 合并到一個簡單的 Ionic 應用程序中,這是我一直遵循的過程:

                  I have been trying to incorperate sqlite into a simple Ionic app and this is the process I have been following:

                   ionic start myApp sidemenu
                  

                  然后我安裝sqlite插件:

                  Then I install the sqlite plugin:

                  ionic plugin add https://github.com/brodysoft/Cordova-SQLitePlugin
                  

                  和 ngCordova

                  and ngCordova

                  bower install ngCordova
                  

                  這給了我以下選項:無法找到適合 angular 的版本,請選擇一個:1) angular#1.2.0 解析為 1.2.0 并且 ngCordova#0.1.4-alpha 需要2) angular#>= 1.0.8 解析為 1.2.0 并且 angular-ui-router#0.2.10 需要3) angular#1.2.25 解析為 1.2.25 并且是 angular-animate#1.2.25、angular-sanitize#1.2.25 所需要的4) angular#~1.2.17 解析為 1.2.25 并且是 ionic#1.0.0-beta.13 需要的前綴選擇!將其持久化到 bower.json

                  this gave me the following options: Unable to find a suitable version for angular, please choose one: 1) angular#1.2.0 which resolved to 1.2.0 and is required by ngCordova#0.1.4-alpha 2) angular#>= 1.0.8 which resolved to 1.2.0 and is required by angular-ui-router#0.2.10 3) angular#1.2.25 which resolved to 1.2.25 and is required by angular-animate#1.2.25, angular-sanitize#1.2.25 4) angular#~1.2.17 which resolved to 1.2.25 and is required by ionic#1.0.0-beta.13Prefix the choice with ! to persist it to bower.json

                  我選擇了選項 3)我將腳本包含在文件中,如下所示:

                  I picked option 3) and I included the scripts in the file as follows:

                  <script src="lib/ionic/js/ionic.bundle.js"></script>
                  <script src="lib/ngCordova/dist/ng-cordova.js"></script>
                  <script src="cordova.js"></script>
                  <script src="js/app.js"></script>
                  <script src="js/controllers.js"></script>
                  

                  然后我在搜索視圖中添加了一個控制器:

                  I then added a controller to the search view:

                  .controller('SearchCtrl', function ($scope, $cordovaSQLite){
                    console.log('Test');
                     var db = $cordovaSQLite.openDB({ name: "my.db" });
                  
                          // for opening a background db:
                          var db = $cordovaSQLite.openDB({ name: "my.db", bgType: 1 });
                  
                          $scope.execute = function() {
                            console.log('Test');
                            var query = "INSERT INTO test_table (data, data_num) VALUES (?,?)";
                            $cordovaSQLite.execute(db, query, ["test", 100]).then(function(res) {
                              console.log("insertId: " + res.insertId);
                            }, function (err) {
                              console.error(err);
                            });
                       };
                  })
                  

                  這導致了錯誤:

                  > TypeError: Cannot read property 'openDatabase' of undefined
                  >     at Object.openDB  (http://localhost:8100/lib/ngCordova/dist/ng-cordova.js:2467:36) 
                  

                  接下來我嘗試通過以下方式手動包含 SQLitePlugin.js:從 plugins/com.brodysoft.sqlitePlugin/www 復制到主 www/ 并將其添加到索引中.html頁面

                  Next I tried manually including the SQLitePlugin.js by: copying from plugins/com.brodysoft.sqlitePlugin/www to main www/ and adding it to the index.html page

                  我嘗試在一切之前包括:

                  I tried including before everything:

                   <script src="SQLitePlugin.js"></script>
                  <script src="lib/ionic/js/ionic.bundle.js"></script>
                  <script src="lib/ngCordova/dist/ng-cordova.js"></script>
                  <script src="cordova.js"></script>
                  <script src="js/app.js"></script>
                  <script src="js/controllers.js"></script>
                  

                  我收到錯誤 ReferenceError:cordova 未定義所以我然后嘗試在cordova.js腳本之后包含它,但仍然得到相同的錯誤

                  I get Error ReferenceError: cordova is not defined so I then tried including it after the cordova.js script but still get the same error

                  非常感謝您的幫助如果相關,這些是我正在使用的 Cordova 和 ionic 的當前版本:

                  would really appreciate the help in case it is relevant, these are the current versions of Cordova and ionic I am using:

                  ionic --version  1.2.5
                  cordova --version 3.5.0-0.2.7
                  

                  這是生成的 bower.json

                  and this is the generated bower.json

                  {
                    "name": "myApp",
                    "private": "true",
                    "devDependencies": {
                      "ionic": "driftyco/ionic-bower#1.0.0-beta.13"
                    }
                  }
                  

                  和我的 package.json:

                  and my package.json:

                  {
                    "name": "myapp",
                    "version": "1.0.0",
                    "description": "myApp: An Ionic project",
                    "dependencies": {
                      "gulp": "^3.5.6",
                      "gulp-sass": "^0.7.1",
                      "gulp-concat": "^2.2.0",
                      "gulp-minify-css": "^0.3.0",
                      "gulp-rename": "^1.2.0"
                    },
                    "devDependencies": {
                      "bower": "^1.3.3",
                      "gulp-util": "^2.2.14",
                      "shelljs": "^0.3.0"
                    }
                  }
                  

                  推薦答案

                  如果有人嘗試在瀏覽器中運行它時仍然出現錯誤,請嘗試以下方法:

                  If someone still got an error when trying to run it in a browser, try this one:

                  if (window.cordova) {
                        db = $cordovaSQLite.openDB({ name: "my.db" }); //device
                      }else{
                        db = window.openDatabase("my.db", '1', 'my', 1024 * 1024 * 100); // browser
                      }
                  

                  這篇關于如何在 Ionic 框架中使用 ngCordova s??qlite 服務和 Cordova-SQLitePlugin?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Update Record in Sqlite Window Phone 8(Sqlite Window Phone 8 中的更新記錄)
                  Build SQLite for windows phone 8(為 Windows Phone 8 構建 SQLite)
                  SQLite 3.8.2 exception on Update statement(更新語句上的 SQLite 3.8.2 異常)
                  How to create database and table in sqlite programatically using monotouch?(如何使用monotouch以編程方式在sqlite中創建數據庫和表?)
                  Xamarin SQLite quot;This is the #39;bait#39;quot;(Xamarin SQLite“這是‘誘餌’)
                  Angular Error - ReferenceError: $modal is not defined(角度錯誤 - ReferenceError: $modal 未定義)
                • <tfoot id='TVoOP'></tfoot>

                      <legend id='TVoOP'><style id='TVoOP'><dir id='TVoOP'><q id='TVoOP'></q></dir></style></legend>

                      <small id='TVoOP'></small><noframes id='TVoOP'>

                      • <bdo id='TVoOP'></bdo><ul id='TVoOP'></ul>

                            <tbody id='TVoOP'></tbody>
                            <i id='TVoOP'><tr id='TVoOP'><dt id='TVoOP'><q id='TVoOP'><span id='TVoOP'><b id='TVoOP'><form id='TVoOP'><ins id='TVoOP'></ins><ul id='TVoOP'></ul><sub id='TVoOP'></sub></form><legend id='TVoOP'></legend><bdo id='TVoOP'><pre id='TVoOP'><center id='TVoOP'></center></pre></bdo></b><th id='TVoOP'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TVoOP'><tfoot id='TVoOP'></tfoot><dl id='TVoOP'><fieldset id='TVoOP'></fieldset></dl></div>
                            主站蜘蛛池模板: 香蕉婷婷| 国产美女精品 | 亚洲精品www | 伊人狠狠干 | 一区二区三区免费在线观看 | 国产ts人妖另类 | 欧美久久久久 | 国产精品美女久久久久久免费 | 欧美日批| 国产精品久久视频 | 国产免费又色又爽又黄在线观看 | 热re99久久精品国99热观看 | 日本韩国欧美在线观看 | 国内久久| 欧美日韩亚洲系列 | 伊久在线 | 成人午夜激情 | 精品福利一区二区三区 | 日韩资源 | 亚洲高清久久 | 国产一区三区在线 | 91精品国产一区二区三区动漫 | 久久天堂 | 国产精品亚洲精品 | 91中文字幕在线 | 欧美日韩精品 | 日本高清不卡视频 | 免费在线黄色av | 在线不卡av | 在线精品一区二区三区 | 黄色片视频免费 | 国产精品亚洲一区 | 国产精品福利视频 | 亚洲精彩免费视频 | 免费a网站| 精品久久久久久亚洲综合网 | 日本精品久久 | 亚洲午夜三级 | 一区二区视频 | 自拍视频在线观看 | 91综合网 |