hacklone / angular2-cool-http Goto Github PK
View Code? Open in Web Editor NEWCool features over angular2 HttpClient
License: MIT License
Cool features over angular2 HttpClient
License: MIT License
getObservable beforeRequestAsync and afterResponseAsync not called
when i use this lib with cool-loading-indicator
the indicator not working
Hi,
I'm using your component with webpack (https://github.com/AngularClass/angular2-webpack-starter) and have warnings during building and also in the chrome console such as:
WARNING in ./~/angular2-cool-http/index.js Cannot find SourceMap '../index.js.map': Error: Cannot resolve 'file' or 'directory' ../index.js.map in D:\test\node_modules\angular2-cool-http
Error encountered resolving symbol values statically. Reference to a local (non-exported) symbol 'CoolHttpModule'. Consider exporting the symbol (position 16:14 in the original .ts file)
Could you make it possible to modify the HTTP headers in a request interceptor? Right now I see clientHeaders
is passed to the request interceptor but they are not used in the actual request.
Hi there,
I'm having issues with building the package from sources: npm install Hacklone/angular2-cool-http followed by npm run build gives me
$ npm run build
> [email protected] build /Users/anton/Downloads/angular2-cool/node_modules/angular2-cool-http
> rm -rf ./dist && tsc --project tsconfig-es5.json && tsc --project tsconfig-es2015.json && cp ./README.md ./dist/README.md && cp ./package.json ./dist/package.json
error TS5014: Failed to parse file 'tsconfig-es5.json/tsconfig.json': Unexpected token u.
npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v5.4.0
npm ERR! npm v3.3.12
From npm-debug.log:
14 verbose stack Error: [email protected] build: `rm -rf ./dist && tsc --project tsconfig-es5.json && tsc --project tsconfig-es2015.json && cp ./README.md ./dist/README.md && cp ./package.json ./dist/package.json`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:232:16)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at EventEmitter.emit (events.js:172:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack at emitTwo (events.js:87:13)
14 verbose stack at ChildProcess.emit (events.js:172:7)
14 verbose stack at maybeClose (internal/child_process.js:821:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /Users/anton/Downloads/angular2-cool/node_modules/angular2-cool-http
17 error Darwin 15.5.0
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
19 error node v5.4.0
20 error npm v3.3.12
I'm trying to build it like this because installing the package by default from npm repo for whatever reason gives me JS files with ES6 syntax (let cookieCollection = this.getCookieCollection();
) which breaks in ES5 only browsers (like desktop & mobile Safari).
Any help with this is highly appreciated.
After import the CollHttpModule i can't build my angular-cli (rc0) project.
A Error occur:
ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol NgModule in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular2-cool-http/node_modules/@angular/core/src/metadata/ng_module.d.ts, resolving symbol NgModule in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular2-cool-http/node_module s/@angular/core/src/metadata.d.ts, resolving symbol NgModule in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular2-cool-http/node_modules/@angular/core/src/core.d.ts, resolving symbol NgModule in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular2-cool-http/node_modules/@angular/core/index.d.ts, resolving symbol CoolHttpModule in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular2-cool-http/index.d.ts, resolving symbol CoolHttpModule in C:/Entwicklung/Projekte/marenta/marenta/node_modules/angular2-cool-http/index.d.ts
Using Webpack with Angular RC4 I'm getting exception "TypeError: Cannot read property 'keys' of null" after getObservable(url) method call.
It seems headers variable is null in method (I do not pass RequestOptions to the method getObservable):
convertAngularHeadersToHttpClientHeaders(headers) {
return headers.keys().map(headerKey => {
var httpClientHeader = new http_header_model_1.HttpHeader();
httpClientHeader.key = headerKey;
httpClientHeader.value = headers.get(headerKey);
return httpClientHeader;
});
}
Hi,
How can I use this library for ionic2? It always throw error without making any request...
Hi .. I try to update my app to angular 2.4.8 (before i used 2.4.4 and everything was ok)...now the only way to update the html (an NgFor loop) is to wrap the assign in a ngZone.run() ... like
async ngOnInit() {
try {
let resp = await this._comuniService.GetAllComuni();
this.zone.run(() => this.comuni = resp);
//before it works like a sharm with ....
// this.comuni = await this._comuniService.GetAllComuni();
//.. but after update Angular.. no :-(
console.log(this.comuni); // here i see the collection OK .. but the UI (HTML) not update
} catch (ex) {
console.log(ex);
}
}
I am calling a basic PUT API controller and receiving the following message:
"Failed to call api PUT https://........"
I am returning a 404 from the API for a resource not found which then shows the message instead of just the response.status like I would expect (I need to use the code to handle logic). If I change the API to return a 200 it resolves it fine (but I obviously need an error code returned this was just testing). I am not doing anything out of the normal when I register the request interceptors.... Just resolve(false).
Is there something I am missing or is this the expected behavior?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.