Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged typescript

0 votes
375 views
1 answer
    I have a typescript file called Projects.ts that I want to reference a global variable declared in a bootstrap plugin called bootbox.js. I want to ... from within a TypeScript classes. Is it possible? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
386 views
1 answer
    When trying ViewChild I am getting the error. Error is "An argument for 'opts' was not provided." Both @ViewChild is giving the error. import { ... error TS2554: Expected 2 arguments, but got 1. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
299 views
1 answer
    I've got a problem loading a class into an Angular component. I've been trying to solve it for a long time; I've even tried joining it all in a ... . Can someone help me spot the issue with my code? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
603 views
1 answer
    How to cancel/abort all pending HTTP requests in angular 4+. There is an unsubscribe method to cancel HTTP Requests but how to cancel all pending requests ... } but how to achieve this globally Any Ideas? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
287 views
1 answer
    I'm trying to use a component I created inside the AppModule in other modules. I get the following error though: "Uncaught (in promise): Error: ... there are multiple declarations. What am I missing? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
404 views
1 answer
    I am trying to implement an icon that when clicked will save a variable to the user's clipboard. I have currently tried several libraries and none of ... variable to the user's clipboard in Angular 5? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
250 views
1 answer
    I have been looking for a way to pass query parameters into an API call with the new HttpClientModule's HttpClient and have yet to find a solution. ... am wondering where to pass in the query parameters? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
203 views
1 answer
    The code explains my question: type A = { a: number, } | null // Extract as defined in lib.es5.d.ts type Extract<T, U> = T extends U ? ... , but I want the real technical definition and working of it. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
291 views
1 answer
    What practical differences are there between defining an interface method: interface Foo { bar(): void; } and defining a property with a function type: interface Foo { bar: () => void; } ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
266 views
1 answer
    I need to make a function to make HTTP calls sequentially inorder to use response of one call into other one like getting IP address of user from first ... return this.http.post(this.registerAPI, body); } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
219 views
1 answer
    If I have a type type foo = Array<{ name: string; test: number; }>, would it be possible to get the type of the values within the array, ... keyof to get the keys, is there something similar for values? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
234 views
1 answer
    Here is my first attempt: (playground link) /** Trigger a compiler error when a value is _not_ an exact type. */ declare const exactType: <T, ... Related: https://github.com/gcanti/typelevel-ts/issues/39 See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
193 views
1 answer
    I have an object that I want to share between my components into an Angular2 app. Here is the source of the first component: /* app.component.ts */ ... it. I removed the providers setting and its worked ! See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
323 views
1 answer
    I have the following structure: interface Test1 { number: number; } interface Test2 extends Test1 { text: string; } let test: Test1[] | Test2[] = ... call signatures How can I map over the test variable? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
191 views
1 answer
    I just have a question regarding structuring and handling responses from http requests within a service. I am using Angular2.alpha46 Typescript ( Just started ... .ts back to the login-form.component.ts See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
208 views
1 answer
    I have a small problem in integrating a meterial design (http://www.getmdl.io/) in ng2 Can you please help me I will put it in points what I ... </div> </form>`, encapsulation:ViewEncapsulation.None, }) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
343 views
1 answer
    I have this enum (I'm using TypeScript) : export enum CountryCodeEnum { France = 1, Belgium = 2 } I would like to build a select in my form, with for ... ">Belgium</option> </select> How can I do this ? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
219 views
1 answer
    I am using Angular 2 and D3.js. I want to show a red rectangle. It only works if I put styles in the style.css file. Check this plunkr When I put my ... value); }) .attr("width", x.rangeBand()); } } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
526 views
1 answer
    I have a problem where my view will not change when I update my variable in my observable subscription. I am trying to show a loading spinner while I ... to hide after I get a response from my backend? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
267 views
1 answer
    In here it is use pathmatch as full and when i delete this pathmatch it doesn't even load the app or run the project import { NgModule } from ' ... : [ AppComponent ] }) export class AppModule { } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
363 views
1 answer
    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 component.ts) It ... it. <div (keypress)="handleInput($event)" tabindex="1"> See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
351 views
1 answer
    I'm trying to make a POST request but i can't get it working: testRequest() { var body = 'username=myusername?password=mypassword'; var headers = ... html form: URL: /api Params: username and password See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
247 views
1 answer
    Angular 2 - How do I navigate to another route using this.router.parent.navigate('/about')? It doesn't seem to work. I tried location.go("/about"); as ... : this.router.parent.navigate('/about'); }); } } See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
270 views
1 answer
    I'd like to ask about my subscribe method. I want to get my objects(employees) from firebase and do a loot of operations on my objects, like avg ... not necessary? Is that allowed to write it like that? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
222 views
1 answer
    Let's say, I have a method that delegates its functionality to some method from external library, and I have a type for that external method ... , but somehow specify its full type LibDoStuffMethodType? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
483 views
1 answer
    Given this code: interface Foo{ one?: string; two?: string; } type Foo2 = { [P in keyof Foo]: number; } I would expect the type of ... it possible to remove the optional modifier when using mapped types? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
319 views
1 answer
    I am using dialog box of angular material2. I want to pass data to the opened component. Here is how I am opening dialog box on click of a ... property in configuration class. Now How can I access that passed data? Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
222 views
1 answer
    I'm using Angular, TypeScript to send a file, along with JSON Data to a server. Below is my code: import {Component, View, NgFor, FORM_DIRECTIVES ... server? I remember in AngularJS (v1) you would use transformRequest. Question&Answers:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
To see more, click for the full list of questions or popular tags.
Ask a question:
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...