Is there a way to programmatically add states to $stateProvider after module configuration, in e.g. service ?   To add more context to this question, I have a situation where I can go with two approaches:   try to force the reload on the state defi...
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...
I'm attempting to use DomSanitizer to sanitize a dynamic URL within a Component using I can't seem to figure out what the correct way to specify a Provider for this service is.  I'm using Angular 2.0.0-rc.6  Here's my current componen...
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 built a shared data service that's designed to hold the users login details which can then be used to display the username on the header, but I cant get it to work.  Here's my (abbreviated) code:  // Shared Service @Injectable() export...
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 started angular two days ago, i m trying to create a service that will do a get request over my spring boot rest end point and I wish to display the result in my angular app  Here is what i have tried till now  My Service:  import { Injectable } fr...
In my angular application, i am in the need to store the data to an array which will be empty at initial stage.  Example:  someFunction() {   let array = [];   console.log("step 1");   this.service.getRest(url).subscribe(result => {      r...
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...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.