How to implement sleep function in TypeScript?

You have to wait for TypeScript 2.0 with async/await for ES5 support as it now supported only for TS to ES6 compilation. You would be able to create delay function with async: And call it BTW, you can await on Promise directly: Please note, that you can use await only inside async function. If you can’t (let’s say you are building nodejs application), just … Read more

Templating with href in angular (4)

AngularJS required that you use ng-href because there were issues with binding expressions to some types of DOM elements and attributes. This problem doesn’t exist in Angular now. The following will work as expected: You can also bind using the attr prefix like this: As others have mentioned. If you are using routing and want to add a href attribute to … Read more

Error : Cannot find primary outlet to load

<router-outlet></router-outlet> needs to be placed inside of rootcomponent or appcomponent. Here, not sure but looks like you want to load loginComponent through router if I’m not wrong. So place/add router-outlet in your root or app component. (NOTE: And remove from LoginComponent if it is not your root/app component)

Angular EXCEPTION: No provider for Http

Import the HttpModule Ideally, you split up this code in two separate files. For further information read: https://v2.angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html https://v2.angular.io/docs/ts/latest/guide/ngmodule.html

No provider for HttpClient

To resolve this problem HttpClient is Angular’s mechanism for communicating with a remote server over HTTP. To make HttpClient available everywhere in the app, open the root AppModule, import the HttpClientModule from @angular/common/http,import { HttpClientModule } from ‘@angular/common/http’; add it to the @NgModule.imports array.imports:[HttpClientModule, ]

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)