我正在使用gmaps4rails在"客户端"显示页面上加载地图.我已经集成了turbolinks以使应用程序更加一致,但是现在我遇到了一个问题,我必须刷新页面以显示地图的地图.我得到的只是一个空白的地图框架.刷新页面时,地图会正确显示.
我尝试添加gem'jquery-turbolinks',但问题仍然存在.
在视图中:
<%= gmaps("map_options" => {:container_class => "map_container_renamed", "zoom" => 15, "auto_zoom" => false},"markers" => { "data" => @json }) %>
Run Code Online (Sandbox Code Playgroud)
在application.js中
//= require jquery
//= require turbolinks
//= require jquery.turbolinks
//= require jquery_ujs
//= require twitter/bootstrap
//= require_tree .
Run Code Online (Sandbox Code Playgroud)
其中,地图是空白页面源代码的要点在这里.
我正在尝试设置一种方法来接收来自其他应用的网址.比如,您在浏览器中,单击共享,并将链接发送到另一个应用程序(我的应用程序).我找到了这个cordova插件,并将其集成到我的应用程序中,但在测试时我仍然没有显示任何URL.
我得到一个警告:
getUri url:null
任何帮助都会很棒.很高兴添加更多代码,如果有用.
app.js:
'use strict';
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
angular.module('starter', [
'ionic',
'firebase',
'starter.services',
'starter.directives',
'starter.controllers',
'ngSanitize'
])
.run(function($rootScope, $state, $ionicPlatform, Post) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory …Run Code Online (Sandbox Code Playgroud)