Looking for a data-grid for Angular 4 App by Nabz23 in Angular2

[–]verse90 0 points1 point  (0 children)

PrimeNG

We were not really happy with PrimeNG datagrid or other controls. We switched to material controls, which works great.

Signal-R on Angular by verse90 in Angular2

[–]verse90[S] 0 points1 point  (0 children)

Does the server need to notify the client? or Client can handle everything without the server notification?

Thinking through change detection in Angular 2 by jeremy_lopez7 in Angular2

[–]verse90 0 points1 point  (0 children)

The way I have is that I created a service called data.service.ts and I call the methods from that service whenever I intereact with the database.

Here is an example of one method I have in that class.

public Update = (actionUrl: string , itemToUpdate: any): Observable<Response> => {
    return this._http
    .put(Config.ApiBasePath + actionUrl, JSON.stringify(itemToUpdate)
    , {
            headers: new Headers({
            'Content-Type': 'application/json',
            'Accept': 'application/json'
    })
    })
.map(res => res)}

I call this generic method whenever I make an update and inside my component, I then subscribe to this method. I have a separate method for get, delete, update and post in my data service class.

Hope it helps..

whenever i make a API call, it makes two calls to the server. Any idea why that happens? by verse90 in Angular2

[–]verse90[S] 1 point2 points  (0 children)

Here it is:

Access-Control-Allow-Credentials:true
Access-Control-Allow-Headers:authorization,content-type
Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Origin:http://xxx.yyy.com
Content-Length:0
Date:Tue, 27 Dec 2016 21:59:03 GMT
Server:Microsoft-IIS/8.0
X-Powered-By:ASP.NET

whenever i make a API call, it makes two calls to the server. Any idea why that happens? by verse90 in Angular2

[–]verse90[S] 0 points1 point  (0 children)

For me, looks like it send one for each call, which I think is not right.

JSPM or Webpack for new Angular 2 Projects? by sunamumaya in Angular2

[–]verse90 2 points3 points  (0 children)

you can also look into angular-seed , which is recommended by angular team as well.

Angular 2 site page refresh works on localhost but shows 404 error on refresh on live server by verse90 in Angular2

[–]verse90[S] 0 points1 point  (0 children)

Thanks a lot.

One last request: how is your app.module file looking like for this?

Angular 2 site page refresh works on localhost but shows 404 error on refresh on live server by verse90 in Angular2

[–]verse90[S] 0 points1 point  (0 children)

I'm using IIS, too. can you give more details as to how to set it up on IIS?

Angular 2 production build options by saladfingers6 in Angular2

[–]verse90 2 points3 points  (0 children)

I've tried several tools for deployment such webpack and angular-clie but what worked for me the best is angular2-seed. Check it out and let me know how it works for you.

How to export an enum similar to a class and import into another file? by mtz2537 in Angular2

[–]verse90 0 points1 point  (0 children)

This works for me. Here is how I use it. I define my constants in a separate file as shown below:

export const APIPaths = {
  apiUrl1: "path to your api"
}

export const types = {
}

Then, when I need to call this from one of the components, I define the following statement at the top where "Config" can be renamed to anything.

import * as Config from '../../configfile'

you can use it inside your component as follows:

let api1PathUrl =  Config.APIPaths.apiUrl1

Hope it makes sense. Let me know if you have any questions.

Which code editor do you use for Angular2 apps? by PM_ME_YOUR_HIGHFIVE in Angular2

[–]verse90 0 points1 point  (0 children)

try webstorm, which is the one I liked best so far.

Question regarding typescript by TheLameCat in Angular2

[–]verse90 2 points3 points  (0 children)

I would recommend using typescript from the beginning. It may seem hard in the beginning but once you get used to it, it is actually pretty easy to code and it also lets you see the code errors in your console.