angularjs-service Questions
1
TL;DR: Static basic functionality that has to do nothing with angular - implement as an AngularJS service vs plain static exported class / methods?
Long version : I've been programming in TS for a...
Confabulate asked 18/8, 2016 at 7:0
1
I am accessing an API via Angular $http requests to gather information for different football teams.
If I were to be only accessing one team, this would be fine - I would create a Service that ma...
Metatarsus asked 30/4, 2016 at 10:58
6
Solved
I am using Angular UI $modal in my project
http://angular-ui.github.io/bootstrap/#/modal
I don't want user to close the modal by pressing on backdrop. I want a modal can only be closed by pressi...
Frederickfredericka asked 29/11, 2013 at 12:59
2
Solved
I'm learning my way around AngularJS at the moment. I've largely got to grips with the way Angular handles dependency injection, but there's a gap I can't find an answer for.
Say I have a service ...
Grenier asked 29/7, 2013 at 23:22
3
Solved
I'm writing an angularJS app. In this particular controller, I open a new browser window through the $window.open service. But in the new window, all the $scope variables are lost.
I tried to use ...
Weatherly asked 3/2, 2014 at 3:8
2
Solved
Given the following service that is meant to create a "dialog" element (i.e. a modal):
app.service('dialog', ['$document', '$compile', '$rootScope',
function($document, $compile, $rootScope) {
...
Hellman asked 29/9, 2014 at 22:4
3
Solved
I wish to change the icon color when connected or disconnected to the firebase server. I got this far:
HTML
<button class="button button-icon ion-cloud" ng-style="dbConnectedStyle...
Ivette asked 22/6, 2016 at 20:23
10
Solved
How do you manage configuration variables/constants for different environments?
This could be an example:
My rest API is reachable on localhost:7080/myapi/, but my friend that works on the same ...
Help asked 2/5, 2013 at 13:41
6
Solved
I am developing a mobile application using Cordova and AngularJS. How do I restrict bootstrapping of AngluarJS before Cordova device ready. Basically I don't want to use any of AngularJS controller...
Darreldarrell asked 4/2, 2014 at 15:9
1
Solved
Given a test filter, say this 'capitalize' filter that will capitalize the first letter of each word:
return function (input) {
return (!!input) ? input.replace(/([^\W_]+[^\s-]*) */g, function (t...
Mindimindless asked 23/5, 2016 at 19:48
4
Solved
I have a service in Angular which uses my API to get user information and provides it to my controllers. It's set up like this:
angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.d...
Wanton asked 28/8, 2013 at 0:50
4
Solved
I am using AngularJS and TypeScript. I want to implement an AngularJS service using a Typescript class, like this:
class HelloService {
public getWelcomeMessage():String {
return "Hello";
}
}
...
Juvenescent asked 18/10, 2013 at 10:53
3
I have a service that is making an AJAX request to the backend
Service:
function GetCompaniesService(options)
{
this.url = '/company';
this.Companies = undefined;
this.CompaniesPromise = $h...
Mckee asked 17/9, 2014 at 20:24
2
Solved
I have been able to properly bind an object with primitive data from a service to a scope variable from a controller but I'm having trouble doing the same thing with an array variable from the serv...
Woundwort asked 7/1, 2014 at 8:18
2
Solved
I am looking for a way to "wrap" all the $http requests so that I can show a gif image whenever the application is doing some processing. I also want to use the same solution for other kind of back...
Fireside asked 30/12, 2015 at 14:53
2
Solved
I've picked up a project and I'm trying to return some data from a service to my controller. I've been at this for about 12 hours, and have tried different methods. They all usually result in this ...
Christoperchristoph asked 7/5, 2014 at 14:32
5
Solved
I'm getting data from an async service inside my controller like this:
myApp.controller('myController', ['$scope', 'AsyncService',
function($scope, AsyncService) {
$scope.getData = function(query...
Bergmans asked 25/10, 2013 at 17:20
4
Solved
I am using some data which is from a RESTful service in multiple pages.
So I am using angular factories for that. So, I required to get the data once from the server, and everytime I am getting the...
Wylma asked 24/8, 2013 at 18:35
2
Solved
I have multiple controllers for multiple routes:
app.controller('FirstController', function ($scope) {
$scope.func = function () {
console.log('route 1');
}
}
app.controller('SecondController',...
Gimel asked 19/11, 2014 at 9:0
1
Solved
I have the following method getData(url) in a my factory which uses $http.get(url) to get data from an URL
angular
.module('az-app')
.factory('WebServiceFactory', function ($http, $q) {
var We...
Yerkovich asked 20/10, 2015 at 19:0
7
Solved
I have an AngularJS service written and I would like to unit test it.
angular.module('myServiceProvider', ['fooServiceProvider', 'barServiceProvider']).
factory('myService', function ($http, fooS...
Assonance asked 8/2, 2013 at 13:6
2
Solved
The following line of code:
var sid = $cookieStore.get('PHPSESSID');
is throwing this error:
SyntaxError: Unexpected token m
at Object.parse (native)
at Object.fromJson (https://ajax.googleapis...
Scarbrough asked 8/9, 2013 at 0:2
2
Solved
I am trying to create a service to get json and pass it to me homeCtrl I can get the data but when a pass it to my homeCtrl it always returns undefined. Im stuck.
My Service:
var myService = ang...
Hebert asked 21/8, 2015 at 19:22
4
Solved
I am having service where I want to use the $cookieStore module. It works fine, but when unit testing it breaks, and gives the error: "$cookieStoreProvider <- $cookieStore <- filtersService"....
Nebulize asked 22/9, 2013 at 14:2
8
Solved
I have some angular factories for making ajax calls towards legacy ASP.NET .asmx web services like so:
module.factory('productService', ["$http",
function ($http) {
return {
getSpecialProducts: ...
Heterochromatin asked 14/8, 2013 at 17:21
© 2022 - 2024 — McMap. All rights reserved.