TypeScript importing / DI a const value between Angular2 Classes / Components

TypeScript
Hi there in my Angular2 app I have a routes file called routes.ts like so (I have only included a few routes here)... export const routes:DisplayRout...
2 years ago

get enum values from a Stringvariable with enum name

TypeScript
In Typescript I get a string variable that contains the name of my defined enum. How can I now get all values of this enum? ...
2 years ago

Angular2 Typescript how to increment alphabet index

TypeScript
I know how to do this in Php, as it is a simple, but i am struggling to get a version working. for ($i = 'A'; $i < 'Z'; $i++) { ...
2 years ago

Angular2, ng2-chart child rendering before parent

TypeScript
I am currently working on a visualization application with Angular2 and TypeScript for the frontend and Spring-Boot for the backend. Now I am at the p...
2 years ago

How to pass parameters to routes in angular2.0

TypeScript
I am trying to use the route params but not able to achieve it since when i importing the Routeparams it shows errors,, My ...
2 years ago

typescript - cloning object

TypeScript
I have a super class that is the parent (Entity) for many subclass (Customer, Product, ProductCategory...) I'm looking to clone dynamically an object...
2 years ago

Creating a version of a generic function with the type 'clamped'

TypeScript
Let's say I have a function that returns some type parameterized by a generic. I'm going to be using this function a lot. Most of the time I'll be usi...
2 years ago

Unresolved type T when creating an Array<T> with generic in Typescript

TypeScript
So I'm trying to create an object which has an arreay of projects I want projects to be a generic of but I'm getting error unresolved type T: export ...
2 years ago

Getting the server response after xhr.send() in an Observable

TypeScript
I implemented a method to POST a file in my Angular 2 app. It is based on the solution I found here. Because Angular 2 doesn't support file uploads ...
2 years ago

How to update fat arrow function using prototype?

TypeScript
Is there a way in which we may update fat arrow function using prototype? class Greeter { greeting: string; constructor(message: string) { ...
2 years ago

Using none NPM modules with Aurelia

TypeScript
I need to integrate the Squareup payment platform into my app. They have a javascript library that they require be used from their cdn. https://docs.c...
2 years ago

Typing a returned observable

TypeScript
Whenever I try to transpile the following code, I receive the error: TypeScript error: /Users/development/Desktop/Source/MyApp/MyApp/app/providers/re...
2 years ago

Experimental decorators warning in Visual Studio Code

TypeScript
I have Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option `t...
2 years ago

TypeScript: why is a number assignable to a reference of type Object?

TypeScript
Why is this legal TypeScript? var x: number = 5 var y: Object = x Surely a number is not an Object. One might suspect that x is implicitly coerced ...
2 years ago

Why don't I have to `import` `anti:fake` into my Meteor source files?

TypeScript
I have seen a few similar questions to this but none seem to apply to my case. I'm creating a Meteor project and using the Atmosphere package 'anti:f...
2 years ago

Atom takes much time to compile typescript files for angular 2

TypeScript
I am working on the Angular 2 RC-6 from Angular2 Documentation. I find atom too slow to compile my '.ts' files. If I move my tsconfig.json from root f...
2 years ago

Update Aurelia binding when properties change

TypeScript
I'm using Aurelia with TypeScript. I'm trying to bind an object to the view and I want the view to update when I change a property of my object. I kno...
2 years ago

controller alias for index.html page

TypeScript
I have a controller class named "BaseCtrl". This controller class takes care of global functions for the default/root HTML page "index.html". As my un...
2 years ago

angular2 use component of nested imported module

TypeScript
is it possible to have the following strucure? app.component.js @Component({ template: '&lt;nav-context&gt;&lt;/nav-context&gt;' class AppCompo...
2 years ago

How do I import from a `.d.ts` file?

TypeScript
This line works in a project which uses angular2 RC4 import * as mapTypes from '../../../../node_modules/angular2-google-maps/core/services/google-ma...
2 years ago