Ah, I see. The ‘angular-mapbox’ is a module. U can’t inject this in your controller. Remove it from injectParams and just use the directive <http://inkblot.io/angular-mapbox/> “mapbox” in your view.
<mapbox map-id="YOUR-MAP-ID" lat="47.603569" lng="-122.329453"></mapbox> Best, Philipp > On 08 Oct 2015, at 10:57, Prudvi Seshu <[email protected]> wrote: > > Hi philipp, > > Thank you very much for the reply. If I use 'angular-mapbox' in the > controller function, I am getting the error: > > Uncaught SyntaxError: Unexpected token - > > I am actually referring to: https://github.com/licyeus/angular-mapbox > <https://github.com/licyeus/angular-mapbox> for mapbox integration to my > website, I think i have to use mapboxService in the controller function. But > it is not working properly. Any other ideas please... > My only concern is to integrate mapbox map in html page using angular js. > > Regards, > Prudhvi. > On Thursday, October 8, 2015 at 12:41:14 PM UTC+5:30, plitzenberger wrote: > Hi Prudhvi, > > The ‘angular-mapbox’ is missing in the controller function. > > > > Regards, > Philipp > > >> On 08 Oct 2015, at 06:38, Prudvi Seshu <prudvi...@ <>gmail.com >> <http://gmail.com/>> wrote: >> >> Hi Sander Elias, >> >> Many thanks for the reply. Yes I have injected angular-mapbox directive into >> the main app.js file like this: >> >> >> >> var app = angular.module(sakeetApp, ['ngRoute', >> 'ngCookies','ngStorage','angular-mapbox','angularFileUpload']); >> >> app.config(['$routeProvider', '$locationProvider', '$httpProvider', >> >> function ($routeProvider, $locationProvider, $httpProvider) { >> >> >> >> In child controller (AdminController.js): >> >> 'use strict'; >> >> >> >> (function () { >> >> var injectParams = >> ['$scope','$rootScope','$location','$route','$localStorage','$window','$cookieStore', >> >> 'ConfigService', 'UserService','CategoryService','angular-mapbox', >> 'FeedService','NotifyService']; >> >> var controller = function ($scope,$rootScope, >> $location,$route,$localStorage,$window,$cookieStore, >> >> ConfigService, UserService, >> CategoryService,FeedService, NotifyService) { >> >> >> After injecting into Admincontroller.js, i am getting the error. I have >> included the 1.mapbox.js, 2. angular-mapbox.js files in index.html file. But >> still the error persist. >> >> >> On Thursday, October 8, 2015 at 9:45:07 AM UTC+5:30, Sander Elias wrote: >> Hi Prudhvi, >> >> Did you inject your mapbox into your application? >> >> Regards >> Sander >> >> -- >> You received this message because you are subscribed to the Google Groups >> "AngularJS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to angular+u...@ <>googlegroups.com <http://googlegroups.com/>. >> To post to this group, send email to ang...@ <>googlegroups.com >> <http://googlegroups.com/>. >> Visit this group at http://groups.google.com/group/angular >> <http://groups.google.com/group/angular>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/angular > <http://groups.google.com/group/angular>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
