The main question - is it possible? I tried with no luck..  main app.js  ... var app = angular.module('myApp', ['services']); app.config(['customProvider', function (customProvider) {  }]); ...   provider itself  var service...
My target is to send data from Angular component to service and use service methods to work on it. Example:  export class SomeComponent {     public data: Array<any> = MyData;     public constructor(private myService: MyService) {       this.my...
Typically i write SPA's and sharing data between controllers is simple with a service.  I am not using an SPA format (not using ng-view), and trying to share data between pages but on load of the second page (to get data) its empty.  PAGE1 (index...
I have the following service:   import { Injectable } from '@angular/core';  import { MenuItem } from './../classes/menu-item'; import { ITEMS } from './../static-data/items-list';  @Injectable() export class ItemsListService...
I am using the excellent Angular Translate ($translate) directive/service to deal with multiple Locale Languages and since I have multiple locale files I use the convenient $translateProvider.useStaticFilesLoader to load my translation files through...
I have the following component in which I am trying to inject a service:  angular.   module('phoneList').   component('phoneList', {     templateUrl: '/static/common/angular/phone-list/phone-list.template.html',     controller...
I am learning RxJs, I am seeking confirmation or correction on my assumption.  I am trying to make a public read only observable in a service that I can use .next() on in various places in my service class. I am wondering if this is the proper way to...
I'm having problems accessing Angular built-in services such as $http when creating a service with ES6.  For example, I'm creating a "ResultsFinder" service that will do an AJAX call and then do some stuff.  The problem is that I only...
I have a service in my angular app that looks something like this:  angular.module('BracketService', []).factory('BracketService', [function() {     function compareByWeight(a, b) {         return a.weight - b.weight;     }     functi...
In Restangular if I declare a service, and do a PUT/PATCH/POST operation it uses the id of the item by default as a primary key. But what if we want to use a custom key? Like a slug or a number ?  // GET to /users Users.getList().then(function(users)...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.