angular2 use component of nested imported module

TypeScript
is it possible to have the following strucure? app.component.js @Component({ template: '<nav-context></nav-context>' class AppCompo...
4 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...
4 years ago

Type Script is not generating JavaScript in my Visual Studio Community edition 2015

TypeScript
I am using Visual Studio Community edition 2015 for development, I have added *.ts file to my project but its not automatically compiling. Also it do...
4 years ago

This keyword becomes the wrong this

TypeScript
All this keywords inside the onScroll function becomes the wrong this, inside the function it becomes the window which makes sense. I want to use the ...
4 years ago

How to get access of the state tree in effects? (@ngrx/effects 2.x)

TypeScript
I am updating @ngrx/effects from 1.x to 2.x In 1.x I have access of state tree in effect: constructor(private updates$: StateUpdates<AppState&g...
4 years ago

String or Number values in Typescript

TypeScript
An example of what I am trying to achieve: class Test { private _folderId: number; private _pageId: number; private _folderName: string; ...
4 years ago

ConnectionBackend not working in angular 2 release? How do I provide XHRBackend?

TypeScript
TypeProvider ConnectionBackend is no longer working after upgrading from Angular 2.0.0-rc.5 to 2.0.0. When I put it in my list of providers. I get th...
4 years ago

Typescript: method is undefined when implementing an interface

TypeScript
I have an interface export interface IFilterable{ passesFilter(f : string, isFilter: boolean): boolean; } That I want to use to filter things in A...
4 years ago

Accessing component properties from jQuery or other events

TypeScript
I'm trying to use vis.js (or jQuery) click events in an Angular2 component. I have my graph displaying just fine, and I can successfully catch click e...
4 years ago

How to create an instance of the same type in a baseclass in typescript

TypeScript
If B extends A, can A define a method that creates a new B? class SetA { constructor(public items:any[]) { } createNew(items){ return ...
4 years ago

How can I use/create dynamic template to compile Component with Angular2?

TypeScript
I want to dynamically create template. This should be used to build a ComponentType at Runtime and place (even replace) it somewhere inside of the hos...
4 years ago

Why is this Angular 2 Pipe not returning data?

TypeScript
I am building an Angular 2 pipe using Angular 2.0.0-RC.4. It should filter all Foo objects passed in as an array of Foo based on property bar. When I ...
4 years ago

How can I get new selection in "select" in Angular 2?

TypeScript
I am using Angular 2 (TypeScript). I want to do something for new selection, but what I got in onChange() is always last selection. How can I get new...
4 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) { ...
4 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...
4 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...
4 years ago

Angular 2 | listen for keypress event on whole page

TypeScript
I'm looking for a way to bind a function to my whole page (when a user presses a key, i want it to trigger a function in my conponent.ts) It was easy...
4 years ago

Anonymous Functions with parameters in Typescript

TypeScript
I'm trying to create an anonymous function in typescript with parameters I'm trying the following format: (function ($, undefined) => {})(jQuery)...
4 years ago

How do I type a function with parameters as `any` or `void` in typescript?

TypeScript
I want to type a function that takes in something OR nothing in typescript. How do I do that? I've tried: interface TestFn { (props: any | void)...
4 years ago

Angular 2 - Unhandled Promise when injecting a service

TypeScript
I've tried to start a project from the official tutorial and I'm having a problem injecting services in my Angular2 app. everything goes fine until I ...
4 years ago