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 00:49
    qdouble removed as member
  • Feb 23 00:49
    govi2010 removed as member
  • Feb 23 00:49
    lanovoy removed as member
  • Feb 23 00:49
    d3viant0ne removed as member
  • Feb 23 00:49
    shlomiassaf removed as member
  • Feb 23 00:49
    mastertinner removed as member
  • Feb 23 00:49
    colinskow removed as member
  • Feb 23 00:49
    matthewdenobrega removed as member
  • Feb 23 00:49
    dotcs removed as member
  • Feb 23 00:49
    DanWahlin removed as member
  • Feb 23 00:49
    Foxandxss removed as member
  • Feb 23 00:49
    niieani removed as member
  • Feb 23 00:49
    katallaxie removed as member
  • Feb 23 00:49
    kentcdodds removed as member
  • Feb 23 00:49
    jeffbcross removed as member
  • Feb 23 00:49
    jimthedev removed as member
  • Feb 23 00:49
    carlosliu removed as member
  • Feb 23 00:41
    PatrickJS commented #1686
  • Feb 22 22:23
    kamil-kielczewski commented #1686
  • Feb 22 22:23
    kamil-kielczewski commented #1686
Sean Larkin
@TheLarkInn
so you can do a require('./path-to-html-file.html')
yup
IMO thats the best option.
Paul van den Berg
@bergvandenp
why? so its all bundled?
Sean Larkin
@TheLarkInn
No external reqests, the templates are inlined, and it allows you to have a great Dev experience with your ng templates in a separate file in your editor so you can use things like Emmet and Syntax highlighting etc.
so
@Component({
  template: require('./foo.html')
})
Paul van den Berg
@bergvandenp
intellij loses the reference when I wrap it in a require.
do you use the same for css?
Sean Larkin
@TheLarkInn
that essentially does
@Component({
  template: `<inline-of>Your HTML file, awesome I can write it in a separate file now sweettttt.</inline-of>`
})
Yes
Use it in the same way, except its in an array for styles
Paul van den Berg
@bergvandenp
ok, thanks
Sean Larkin
@TheLarkInn
no prob
There should be some explanation in Patricks starter in the loaders section
Paul van den Berg
@bergvandenp
kinda confusing some ppl use webpack in quickstarts and others use systemjs
Sean Larkin
@TheLarkInn
for raw-loader
It is. I always advocate webpack becuase I believe it provides the best experience for not only the developer, but also for the browser becuase its optimized out of the box really well.
if you want something super lite to ramp up into this starter you can take a look at mine also
Paul van den Berg
@bergvandenp
cool, thanks
got another question on a different subject tho ;
;)
Sean Larkin
@TheLarkInn
lmao I'll try and help
Paul van den Berg
@bergvandenp
how can I validate the package.json...
as in: clean my own installed modules and rebuild from scratch to check it for other devs
I've been experimenting here and there and need to clean up deps
Sean Larkin
@TheLarkInn
hmm, I'm sure theres something out there
Brought to you by google.com ;-)
Paul van den Berg
@bergvandenp
heh thnx. found that, but that's not really what I'm looking for (i think)
I want to be certain my package.json is valid so that stuff runs smoothly on a clean machine
Nevergonnachange
@Nevergonnachange
Hello everyone. I've started a project with the angular2-webpack-starter. Now I want to add an express API server. I've made a stackoverflow concerning my problems. http://stackoverflow.com/questions/37309419/angular2-webpack-express-api-server
Any help would be very appreciated.
falconmick
@falconmick
Doesn't it already use express? I thought that this project uses that connect thing
Connect middleware *
webdev48
@webdev48
Has anyone used ng2-bootstrap with this starter ?
I am trying to integrate typeahead and I am stuck
Sean Larkin
@TheLarkInn
After you getting any errors
Dominic
@domfarolino
@falconmick I'm in a similar position as @Nevergonnachange , I have an existing angular2 project using node and express as a backend right now, the site serves my main index file and angular2 takes care of the view from there, is it easy to convert this from a system.js => webpack project?
I'd rather not have webpack start a localhost and open a browser and port and everything if I could just keep all that on the server and continue serving my index file, that seems like the best scenario especially if I'm deploying to heroku but I could definitely be wrong there
my project is at https://github.com/domfarolino/angular2-login-seed if that helps. I'd rather be using webpack than sys if that make sense to do
Sean Larkin
@TheLarkInn
Dominic
@domfarolino
@TheLarkInn So this will go in the Node backend?
Is it possible to separate these two processes? As in just have node serve the static index file that webpack is in charge of managing dependency chain with?
I don't know much about webpack so I'm probably treating it too much like systemJS
Sean Larkin
@TheLarkInn
Yup!
Thats what you add to your server.js
@domfarolino https://webpack.github.io/docs/webpack-dev-middleware.html you can reference this small example to use webpack-dev-server also in your server.js
Dominic
@domfarolino
alright i'll look into it thank you
Sean Larkin
@TheLarkInn
Np! :-D Happy webpacking.