Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 23 2020 00:49
    qdouble removed as member
  • Feb 23 2020 00:49
    govi2010 removed as member
  • Feb 23 2020 00:49
    lanovoy removed as member
  • Feb 23 2020 00:49
    d3viant0ne removed as member
  • Feb 23 2020 00:49
    shlomiassaf removed as member
  • Feb 23 2020 00:49
    mastertinner removed as member
  • Feb 23 2020 00:49
    colinskow removed as member
  • Feb 23 2020 00:49
    matthewdenobrega removed as member
  • Feb 23 2020 00:49
    dotcs removed as member
  • Feb 23 2020 00:49
    DanWahlin removed as member
  • Feb 23 2020 00:49
    Foxandxss removed as member
  • Feb 23 2020 00:49
    niieani removed as member
  • Feb 23 2020 00:49
    katallaxie removed as member
  • Feb 23 2020 00:49
    kentcdodds removed as member
  • Feb 23 2020 00:49
    jeffbcross removed as member
  • Feb 23 2020 00:49
    jimthedev removed as member
  • Feb 23 2020 00:49
    carlosliu removed as member
  • Feb 23 2020 00:41
    PatrickJS commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
  • Feb 22 2020 22:23
    kamil-kielczewski commented #1686
Joanne Yae
@nyjy85
but it doesn't work
Ben
@sysupbda
I was about to say that I use DI for such cases
Joanne Yae
@nyjy85
What is DI?
Ben
@sysupbda
But in fact I don't really have such cases anymore :)
Dependency Injection
I used lodash a lot in ES5, but there are only very few things I would be missing in ES6 that would justify me still using lodash with typescript or ES6
Not sure how you could DI an entire module though to be honest
Joanne Yae
@nyjy85
well, you can do it with jquery
but it only works for jquery -_-;; and i dont know why
Ben
@sysupbda
With the alias logic you mentioned?
Joanne Yae
@nyjy85
for some reason you don't need an alias for jquery
new webpack.ProvidePlugin({
jQuery: 'jquery',
$: 'jquery',
jquery: 'jquery'
})
thats all you need
Ben
@sysupbda
you've made me curious. Would like to see what others say how they would do this. But I really find it extremely rare to need a module across many components modules since typescript and ng2
Joanne Yae
@nyjy85
you're right, its rare but i use lodash and moment everywhere
would like to have it available globally without requireing it in all my components
Ben
@sysupbda
yep.. i understand. i'll keep watching for answers here :) you might have more success in a webpack specific chat though no?
Joanne Yae
@nyjy85
Actually, I found an alternative. if you import your 3rd party libraries in your entry file, you can use them throughout your whole app without needing to require them in individual components. this essentially globalizes it
I still want to know how you can do it with resolve.alias and with plugins
Anas R. Firdousi
@afirdousi
@nyjy85 yes thats exactly the way it should be done. Import it in your main.ts or wherever you are bootstrapping your Angular app.
https://twitter.com/AnasFirdousi/status/707762724457938945
Folks, please free to comment, question or any feedbacks are hihgly appreciated.
Maciej Kowalski
@fkowal
hello

can anyone explain to my what

preLoaders: [
// TODO(gdi2290): exclude: [ helpers.root('node_modules/rxjs') ] fixed with rxjs 5 beta.3 release
{ test: /.js$/, loader: "source-map-loader", exclude: [
helpers.root('node_modules/rxjs')
] }
],

is the story behing excluding node_modules/txjs

and the comment TODO(gdi2290) ?

i have the same problem with ng2-bootstrap and if i knew what the problem is i would try to fix it in ng2-bootstrap

Leigh Caplan
@texel
Hey all, I had a quick question- is there a reason that the ng2 webpack starter isn't pulling in the polyfill bundle provided with angular2, vs using es7-reflect-metadata, zone.js/microtask, etc?
I couldn't find any explanation and I don't like cargo culting :)
Joanne Yae
@nyjy85
This message was deleted
This message was deleted
This message was deleted
Duncan Davis
@tanahara
I am having an issue with the timeout on typings install
node is complaining about "es6-promise": "github:typed-typings/npm-es6-promise#fb04188767acfec1defd054fc8024fafa5cd4de7"
It times out
Artur Rozwalak
@arozwalak
hi guys, I was wondering if it's possible to configure prod version to compile components into separate files, and than lazy load components as they are needed instead loading whole application at once?
94b
@94b
hi, do somebody has an example how to use this package with https://github.com/justindujardin/ng2-material ?
Maciej Kowalski
@fkowal
@94b i am using it with https://github.com/valor-software/ng2-bootstrap, it probably similar
94b
@94b
thanks @fkowal
Matthew de Nobrega
@matthewdenobrega
Hi all, I have a fairly large application based on this starter, and for Angular beta > 6 the dev server keeps running out of memory. Has anyone else had a similar issue, and any ideas on how to optimize the webpack config? Commenting out app entrypoints doesn't help so it looks like angular is the main culprit here. Downgrading to 6 fixes the issue.
Sam Jones
@ollwenjones
@arozwalak you have to use webpack require.ensure blocks to make it spit things into different chunks, then you have to figure out a way to load them in angular at the right time.
You can use asyncRoute to do this on a basic level fairly easily, though I imagine the more granular you want to be, the more complicated the setup will get... very quickly.
Matthieu Drula
@matthieu-D
Hi guys
Can somebody tell me which file to modify to turn off Hot Reload please?
Artur Rozwalak
@arozwalak
thnx @ollwenjones, i'll try that
Sam Jones
@ollwenjones
@matthieu-D you need to look at the arguments passed into the webpack-dev-servernpm scripts in the package.json
Sam Jones
@ollwenjones
@arozwalak heads up because I burned a lot of time missing this: require.ensure blocks are crawled by webpack essentially 'compile time' - so they have to exist ahead of anything that happens at runtime. Also, you might have to look up a type definition for webpack require. There's some instructions near the bottom here: https://github.com/TypeStrong/ts-loader
Meiblorn
@meiblorn
Guys, hello.
When I use [(ngModel)] in my templates I am getting the 'No value accessor for '' in [null]' error. Here is example: http://plnkr.co/edit/BUvGjFhgpxoe5k2UyjWe?p=preview . How to fix?
To see error just open debug pane
I get this error only in production mode. In debug mode it works well
sorry, 'development' mode
Sam Jones
@ollwenjones
@meiblorn that plunk is using alpha.39... are you building in alpha.39?
Meiblorn
@meiblorn
No, it was just for example to show error. Look here: https://github.com/AngularClass/angular2-webpack-starter/blob/master/src/app/home/home.html . If I use [(ngModel)] directive instead of [value]="data.value" (input)="data.value = $event.target.value" I get such error after html minification
If not — it works perfectly