Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 15 15:20
    alanhg commented #1997
  • Sep 30 15:12
    bbrink68 commented #2049
  • Aug 23 13:34
    SouravKumar89 edited #2058
  • Aug 23 13:27
    SouravKumar89 opened #2058
  • Aug 22 00:04

    PatrickJS on master

    Update README.md (compare)

  • Aug 13 17:17
    ramsunvtech commented #1925
  • Aug 12 22:58
    terrancecorley commented #770
  • Aug 09 02:30
    jindovu commented #2049
  • Aug 09 02:22
    jindovu opened #2057
  • Aug 08 10:49
    krawinkelm commented #2053
  • Jul 21 14:14
    FilipLitwora commented #958
  • Jul 21 14:14
    FilipLitwora commented #958
  • Jul 21 14:14
    FilipLitwora commented #958
  • Jul 09 11:40
    Sanafan commented #1713
  • Jul 05 11:41
    hoang-innomizetech commented #2053
  • Jul 05 07:32
    Jilaba commented #1824
  • Jun 29 04:31
    Jason-Cooke synchronize #2055
  • Jun 28 14:51
    jesslilly commented #1827
  • Jun 12 18:16
    dvaldivia commented #1969
  • Jun 12 17:55
    dvaldivia commented #2049
webdev48
@webdev48
export class MyService {

  public data:any;

  constructor(private http:Http) {
    this.http.get('/data/settings.json')
      .subscribe(res => this.data = res.json());
  }
}
Forrest Murray
@FMurray
@webdev where are you using the service? did you add it to the providers?
webdev48
@webdev48
yes all of that is fine... obviously i am consuming it in a component

@Component({
  selector: 'home',  // <home></home>
  providers: [
    MyService
  ],
  styleUrls: [ './home.component.css' ],
  templateUrl: './home.component.html'
})
export class HomeComponent implements OnInit {

  // TypeScript public modifiers
  constructor(
    public myService: MyService
  ) {
    console.log(myService.data);

  }
}
Forrest Murray
@FMurray
Is that all the code? \
You need to use @Injectable decorator I believe
webdev48
@webdev48
im using that as well on the service
Forrest Murray
@FMurray
.subscribe(res => this.data = res.json().data)
webdev48
@webdev48
already doing that in the service if you look above ^^ and it does not need .data in the end
its a 404 dude EXCEPTION: Response with status: 404 Not Found for URL: http://localhost:4000/data/settings.json
Carlos Esteban Lopez Jaramillo
@luchillo17
Anyone can explain me what does this do in webpack config?
// Fix Angular 2
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)async/,
        helpers.root('node_modules/@angular/core/src/facade/async.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)collection/,
        helpers.root('node_modules/@angular/core/src/facade/collection.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)errors/,
        helpers.root('node_modules/@angular/core/src/facade/errors.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)lang/,
        helpers.root('node_modules/@angular/core/src/facade/lang.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)math/,
        helpers.root('node_modules/@angular/core/src/facade/math.js')
      ),
Carlos Esteban Lopez Jaramillo
@luchillo17
Ok seems nobody will answer the last one, how about this one, i've tested the AoT with @ngtools/webpack and it looks simpler than the one used in this repo at this moment, is there any good reason to stick with ngc-webpack?
alisherabd
@alisherabd
@FMurray I just wanted to see docker container in use. Let's say I have this production image, how do I load it locally with docker and see on browser, before deploying to cloud?
Alen
@Devgaze
Hi everyone, so I'm trying to build my project and it finishes it without any errors, my first page loads but when I try to access users page directly by entering URL path it throws 404. Trying to do the same while dev server running just works fine. The only thing I changed in router module is location strategy to push strategy. I tried the same thing on the repo itself and it doesn't work as well, so I'm thinking did I forgot to change something else? Any help appreciated
Steps to reporoduce:
  1. git clone --depth 1 https://github.com/angularclass/angular2-webpack-starter.git
  2. npm install
  3. in src/app/app.module.ts remove following , { useHash: false, preloadingStrategy: PreloadAllModules }
  4. run npm run build:prod
  5. run npm run server:prod
  6. navigate to http://127.0.0.1:8080/details
Alen
@Devgaze
what am I missing here (I'm getting a feeling it's one of those situations when you don't see an elephant in front of you) :worried:
Alen
@Devgaze
ok I'm an dumbass, I didn't provide web.config (.htaccess) in CopyWebpackPlugin
Forrest Murray
@FMurray
@alisherabd what version of the docker host do you have?
Carlos Esteban Lopez Jaramillo
@luchillo17
Anyone can explain me what does this do in webpack config?
// Fix Angular 2
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)async/,
        helpers.root('node_modules/@angular/core/src/facade/async.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)collection/,
        helpers.root('node_modules/@angular/core/src/facade/collection.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)errors/,
        helpers.root('node_modules/@angular/core/src/facade/errors.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)lang/,
        helpers.root('node_modules/@angular/core/src/facade/lang.js')
      ),
      new NormalModuleReplacementPlugin(
        /facade(\\|\/)math/,
        helpers.root('node_modules/@angular/core/src/facade/math.js')
      ),
Ok seems nobody will answer the last one, how about this one, i've tested the AoT with @ngtools/webpack and it looks simpler than the one used in this repo at this moment, is there any good reason to stick with ngc-webpack?
beyersito
@beyersito
Hi, I am trying to deploy to a subdomain
but I cant get it to work
Alexander B.
@alexanderbelko
@FMurray Unfortunatly, no. I've spent a lot of time looking for working recipe
alisherabd
@alisherabd
@FMurray it's Docker version 17.03.1-ce
Kaito Yuuki
@KaitoYuuki_twitter
someone can share with me a app example made with angular2-webpack-starter please :) ?
Roman Gorodeckij
@holms
@KaitoYuuki_twitter been asking same thing earlier, there's none probably. i mean this starter barelly works, it's a mess in here all over the place especially in webpack config. time to leave this channel
Brandon James
@nla-brandonjames
How do I use third party scss with this boilerplate code?
Brandon James
@nla-brandonjames
Never mind, after some time I realized the css framework I wanted to use wasn't slated to finish angular 2 support until November 2017
Girish Rathod
@RathodGirish
Hi guys,
I am using angular2 app. First time component loading too much.
I want to speed loading first time?
Any best solutions or example please?
Ritwik Banerjee
@ritwbanerjee
lazy load the modules.. load what you need
@RathodGirish
Girish Rathod
@RathodGirish
Yeah thanks @ritwbanerjee Is there any best example with lazy loading with multiple routes
?
Ritwik Banerjee
@ritwbanerjee
there are plenty
@RathodGirish
check this
Girish Rathod
@RathodGirish
Thanks @ritwbanerjee
Ritwik Banerjee
@ritwbanerjee
you are welcome
:-)
prietysingh
@prietysingh
Hi, can anyone help me with how to include external css and js files in the starter kit?
Rishi Raj
@rishiraj824
Is this the right command to host your dist files on your github-pages ng build --prod --base-href "https://USERNAME.github.io/REPOSITORY/" angular-cli-ghpages I'm using angular-cli-ghpages. I have a custom-domain and I don't know it doesn't use the branch gh-pages as well, and nothing is being updated even after a successful deployment.
Would be nice to get some assistance
Robert Lavoie AKA BobbyDigital
@rlavoie
What is the + before the folder name for?
Mark Oliver
@invegat
They are trying to show the loadChildren routes, for this route "{ path: 'detail', loadChildren: './+detail#DetailModule' }, " all the rest of the application know is that the module is in
the "+detail" directory and the class name is "DetailModule" The child routes aren't imported anywhere are not in app.module.ts.
Raj
@getmetorajesh
I can't seem to get signUpForm.get("password")?.value to work but signUpForm.controls.password?.value works fine. any advice?
Ketan Patel
@pketan40_twitter
HI guys i was not able to bind ag-grid in webpack
css is not working