How to import linq-es2015?
See original GitHub issuein package.json “dependencies”: { … “linq-es2015”: “2.4.4”, …
in systemjs.config.js var map = { … ‘linq-es2015’: ‘node_modules/linq-es2015’ …
var packages = { … ‘linq-es2015’: { main: ‘index.js’, defaultExtension: ‘js’ } …
in gulpfile.js gulp.src(‘./node_modules/linq-es2015/*/.js’).pipe(gulp.dest(‘./wwwroot/node_modules/linq-es2015’));
then in xxx.ts file: import * as Enumerable from “linq-es2015”;
ngOnInit() { var count = Enumerable.asEnumerable([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) .Where(a => a % 2 == 1) .Count();
alert(count);
…
but when run in chrome , Error: XHR error (404 Not Found) … Error loading http://localhost:5000/node_modules/linq-es2015/index.js as “linq-es2015” from http://localhost:5000/app/xxxx.js
can anyone help me? why error happied?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
linq-es2015 - npm
Start using linq-es2015 in your project by running `npm i linq-es2015`. ... import * as Enumerable from "linq-es2015";.
Read more >linq-es2015 - npm Package Health Analysis - Snyk
Complete implementation of Language-Integrated Query (LINQ) (ECMAScript 2015 Language Specification) For more information about how to use this package see ...
Read more >How to GroupBy on two keys with linq-es2015? - Stack Overflow
Short question: How to groupby on two keys by using linq-es2015 in an Angular app? One key works well, but I got no...
Read more >LINQ | RunKit
Module has to be loaded by calling require or using import keyword: import {asEnumerable, Range} from "linq-es2015"; Module exports following functions:.
Read more >Learn ES2015 - Babel
See the ES2015 standard for full specification of the ECMAScript 2015 ... Don't require realizing an array, enabling lazy design patterns like LINQ....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why don’t you use one of the provided examples?
To be used in chrome linq-es2015 has to be processed by browserify utility. There are sample projects here and here. Home page for the project has all the required info as well.
If you need already processed module look under latest releases. You will find regular as well as minified modules attached to the release.
@ENikS Thank you very much.I lost ‘linq-es2015’: { main: ‘dist/linq.js’, defaultExtension: ‘js’ }. It is working correctly.