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...
This is my first project on Angular and I have done as much as I could and I will try to finish it myself but I feel like that I require help. A brief description of the project : I have a class mod.ts export interface Mod { id : number ,...
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 am trying to make a service that handles contacts in Angular 2. This is what i got so far. import { Injectable } from '@angular/core'; import { Http } from '@angular/http'; import 'rxjs/add/operator/toPromise'; @Injectabl...
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...
©2020 All rights reserved.