Ng-map (angular map) is not working now - angularjs

Previuosly when I use ng-map it was working fine but now its not working, I get blank map. I am getting this error from google map api:
The Google Maps JavaScript API must be downloaded directly from
Google's servers. Learn more:
https://developers.google.com/maps/documentation/javascript/tutorial#Loading_the_Maps_API

you should be downloading the google maps JS from google's servers, as stated in ng-maps' DOCS
Include Google maps:
<script src="http://maps.google.com/maps/api/js"></script>
Name your angular app ngMap, or add it as a dependency
var myApp = angular.module('myApp', ['ngMap']);

Related

UPI Deeplinking from IONIC to BHIM - Ionic1 (WebIntent)

Currently I am working on a Project which is implemented in Ionic 1 and AngularJs.
Now we are working to integrate it with BHIM UPI to perform In-App payment. I think we need to install IONIC Native Web Intent plugin in order to make web intent call to BHIM.
But I am fairly new to angularJs and Ionic. I have seen some of the questions related to this but those are implemented in Ionic3 and latest versions.
UPI Deeplinking from IONIC to GooglePay does not work as expected
DEEPLINK_HOST in ionic deeplink
Deeplinking - Opening an Ionic App through another Ionic App
I have tried to achieve this by making Web Intent calls with help of this https://www.npmjs.com/package/#ionic-native/web-intent?activeTab=readme but with no luck. It's giving Error message like below
ionic.bundle.min.js:150 Error: [$injector:unpr] http://errors.angularjs.org/1.5.3/$injector/unpr?p0=webIntentProvider%20%3C-%20webIntent%20%3C-%20PaymentComponent%20%3C-%20PaymentComponent
at http://localhost:8100/js/ionic.bundle.min.js:40:416
at http://localhost:8100/js/ionic.bundle.min.js:77:7
at Object.d [as get] (http://localhost:8100/js/ionic.bundle.min.js:74:270)
EDIT :
I want to open BHIM UPI app from my Ionic App and able return success or failure status of transaction.
Any help or directions to achieve this will be highly appreciated.
There is no 'webIntentProvider' exists in ionic providers.
You've to remove 'webIntent' from your controllers injections. And use below code to open existing UPIs available in your mobile.
window.plugins.intentShim.startActivity(
{
action: window.plugins.intentShim.ACTION_VIEW,
url: urlIntent
},
function () { },
function () {
alert('Failed to open URL via Android Intent')
}
);
It'll show all available UPI providers which are installed in your mobile. Please go through documentation Deeplinking UPI for more details.
Cross check your package.json & confilg.xml, whether you installed above plugin in your app or not.

Adsense Stopped Showing Ads after Angularjs used

I have an Asp.net mvc site with Google adsense enabled with scripts added in the Layout.cs and contents getting generated via ajax and jquery from api. Everything was working fine and ads where showing
Recently I had added a new page where I used angularjs for databinding using CDN .and the page is working well.but ads stopped showing up. only on that page.the message showing on console is
The resource http://pagead2.googlesyndication.com/pagead/js/r20190313/r20190131/show_ads_impl.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.
And in Layout.cs
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-1771190807684402",
enable_page_level_ads: true
});
</script>
Adding URL of my Site for reference
JumptoJob-Online exam
And my angularjs controller for page looks simple
<script>
"use strict";
/*We need to manually start angular as we need to
wait for the google charting libs to be ready*/
var mainApp = angular.module("mainApp", ['googlechart']);
mainApp.controller('QuestionController', myControllerFunction);
myControllerFunction.$inject = ["$scope", "$http", "$timeout"];
function myControllerFunction($scope, $http, $timeout) {
}
</script>
I contacted adsense support and provided the URL.they asked me to wait for some hours and then ad start showing. asper them its always better to use adsense directive with angularjs than just using normal adsense script and auto ads

Angular google maps error:- Uncaught Error: Google Maps API not available

I am new in Ionic app development. I installed angular google maps using bower
bower install angularjs-google-maps
then added these ref files in index.html
<script src="lib/lodash/dist/lodash.js"></script>
<!-- ionic/angularjs js -->
<script src="cordova.js"></script>
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/angular-simple-logger/dist/angular-simple-logger.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyB52Z0xUP6JEX9fjr1EEQvCWgo8W4DD5CY&extension=.js"></script>
<script src="lib/angularjs-google-maps/dist/angularjs-google-maps.js"></script>
Finally added the gm module as a dependency to your AngularJS app:
angular.module('taskerApp', ['ionic', 'taskerApp.controllers', 'taskerApp.services', 'pickadate', 'gm'])
It is showing a blank screen and giving this error in console.
angularjs-google-maps.js:40 Uncaught Error: Google Maps API not available, please make sure the Google Maps library is loaded before the AngularJS Google Maps library is loaded
Please help me resolve this.
As per the docs:
Make sure to load the AngularJS library and the Google Maps API:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places"></script>
Then load the AngularJS Google Maps library:
<script src="bower/angularjs-google-maps/dist/angularjs-google-maps.js"></script>
Finally add the gm module as a dependency to your AngularJS app:
angular.module('yourApp', ['gm']);
That's it! You can now start adding Google Maps directives to your
markup.
My guess is you don’t include the files in the right order.

bootstrapping forerunnerDb into angular- electron app

am looking to use a forerunnerDB , as a standalone database and running an electron framework to create a desktop ,
am having problem implementing the bootstrapped process,
var ForerunnerDB = require('forerunnerdb');
var fdb = new ForerunnerDB();
am using angular as the frontend , and electron bootstrapping ,
angular.module('RDash')
.controller('MasterCtrl', ['$scope', '$cookieStore', MasterCtrl])
.controller('tableCtrl',['$scope', '$cookieStore', tableCtrl]);
var ForerunnerDB = require('forerunnerdb');
var fdb = new ForerunnerDB();
but i get require == undefined error , where do bootstrap the forerunner
The require() call is part of Node.js used to include modules for use. If you are trying to instantiate ForerunnerDB on the client-side or in a browser you need to include the file ./dist/fdb-all.min.js instead (which is included in the ForerunnerDB download) as described in the documentation here: https://github.com/Irrelon/ForerunnerDB#use-forerunnerdb-in-browser
In the index.html of your AngularJS app, put this in the <head> section before your angular scripts but after jQuery and other third party libraries:
<script src="./forerunnerdb/dist/fdb-all.min.js" type="text/javascript"></script>
Make sure you change the path of the file to wherever you have put ForerunnerDB.
Disclaimer: I am the creator of ForerunnerDB

Deploy Angular.js App in Salesforce (SFDC)

Deploy angular.js app in Salesforce (SFDC).
I have tried using https://developer.salesforce.com/en/mobile/getting-started/html5/#angularjs
Here is a draft article and sample app that combines AngularJS and Bootstrap in Visualforce: https://github.com/jamesward/visualforce-angular-bootstrap/blob/master/ARTICLE.md

Resources