These are chat archives for AngularClass/angular2-webpack-starter

14th
Jul 2016
Daniel
@hameltomor
Jul 14 2016 02:23
Hi! How I can include this module https://www.npmjs.com/package/ng2-qrcode using webpack-starter?
Where I need include the javascript file?
ekiyanov
@ekiyanov
Jul 14 2016 09:50

hello

I'm stuck with custom component with ES6
In the app.html i have

<side-menu>
</side-menu>

and i have a component

import {Component} from "@angular/core"

@Component({
  selector: 'side-menu',
  templateUrl: 'build/pages/sidemenu/sidemenu.html'
})
export class SidemenuComponent {

  constructor() {
      alert('ok');
  }
}

app.js

...
import {SidemenuComponent} from './pages/sidemenu/sidemenu';
...

ok is never fired, and there is no any error at the log, and in the final html code i see only <side-menu>, without content of my templateUrl
I'm missing something but cannot realise what

Paul van den Berg
@bergvandenp
Jul 14 2016 11:19
@ekiyanov did you write any bootstrap code? is this supposed to be the root component?
question: how do you guys structure protractor (or other e2e) testcode?
in a separate folder or next to the components?
In the seed there's a e2e test next to the component, but what about "shared steps"?
Paul van den Berg
@bergvandenp
Jul 14 2016 11:30
@ttecho did you add webpack-merge as a dependency in package.json?
ttecho
@ttecho
Jul 14 2016 13:55
@bergvandenp we did using "webpack-merge": "^0.14.0", but we were able to resolve the issue now
On another note, has anyone successfully deployed this starter to a Cloud Foundry/Heroku foundation? If so what steps/buildpacks/configurations did you use
99% Cocoa
@rjlee7
Jul 14 2016 18:35
Is there a sample node/express backend to the starter that I could take a look at? I put "node-server": "cd server && npm install && nodemon server.js"line under scripts in package.json and created a node server at a different port, but was wondering if there was a better way to do this (that would go nicely with webpack).
Josh Elias
@JoshElias
Jul 14 2016 21:17

Is this an appropriate way to use sass?

@Component({
...
// webpack.config.common
{
     test: /\.scss$/,
     exclude: /node_modules/,
     loader: 'style-loader!css-loader!sass-loader'
}

// inside component
SampleComponent ],
    styles: [ require( "./sample.component.scss") ]
})

I'm getting an error that I'm getting the following error Expected 'styles' to be an array of strings.