Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 11:42
    petebacondarwin commented #43887
  • 11:40
    ngbot[bot] milestoned #43887
  • 11:40
    ngbot[bot] milestoned #43887
  • 11:40
    petebacondarwin labeled #43887
  • 11:40
    petebacondarwin labeled #43887
  • 11:40
    petebacondarwin labeled #43887
  • 11:40
    petebacondarwin labeled #43887
  • 11:38
    willydee commented #43888
  • 11:36
    petebacondarwin commented #43888
  • 11:35
    petebacondarwin commented #43875
  • 11:28
    willydee commented #43888
  • 11:25
    petebacondarwin commented #43876
  • 11:23
    petebacondarwin closed #43888
  • 11:23
    petebacondarwin commented #43888
  • 11:23
    petebacondarwin commented #43888
  • 11:21
    petebacondarwin commented #43888
  • 11:20
    petebacondarwin commented #43888
  • 11:12
    pullapprove[bot] review_requested #43700
  • 11:12
    petebacondarwin review_request_removed #43700
Eric Martinez
@ericmartinezr
:+1:
Ville Vainio
@vivainio
Meaning: Observables should be treated more "this is how callbacks work now" (like promises before that), not "reactive programming revolution is here and no codebase is safe" (as that can be intimidating)
Daniel
@gaiottino
Is it no longer possible to use a regular link-tag to call a route without reloading the page?
The <a [routerLink] syntax is often very combersome
AleŇ°
@fxck
@gaiottino there might be a new syntax
comming soon...ish
Daniel
@gaiottino
Ah. Cool. Thanks
James Pacileo
@jamespacileo
@robwormald > this is where the webworker integration is nice, if you're doing something realllly heavy
Thanks for the suggestion!
Eric Martinez
@ericmartinezr
@robwormald :point_up: 28 de Diciembre de 2015 10:48 in the hangout talk at 27:40 you talk about Observables cleaning up themselves, is that always the case? Is it necessary to us to unsubscribe in ngOnDestroy for example, as a good practice?
Eric Martinez
@ericmartinezr
@robwormald for example in AsyncPipe you handle the unsubscription manually (maybe because it supports Promises too?)
James Pacileo
@jamespacileo
Might be a silly question but... can an individual component run in a web worker? Rather than the whole app?
Ghost
@ghost~5539edbc15522ed4b3df7357
Hi. Can I lazy-load components depending on information only available at runtime? So a REST API returns a set of components that I can use and their URLs and my application then displays said components to the user?
Daniel
@gaiottino
import {Component} from 'angular2/core'

@Component({
  selector: 'gridifier',
  template: `
    <div class="gridifier">
      <ng-content></ng-content>
    </div>
  `
})
export class Gridifier {
  ngOnInit() {
    var grid = new (<any>window).Gridifier($('.gridifier'), {
      query: '> div',
      dragifier: true
    })
    grid.append(grid.collectNew())
  }
}
How should I rewrite the above component to get rid of $('.gridifier')? Not sure what the best practice is when wrapping a jQuery plugin like that.
James Pacileo
@jamespacileo
do you mean document.getElementByClassName('gridifier')?
Daniel
@gaiottino
Well that's more or less the same. Direct access to the DOM. I wanted something similar to ElementRef but not sure that's what I should use... it has a big red warning box ;)
Eric Martinez
@ericmartinezr
@gaiottino
@Component({
  selector: 'gridifier',
  template: `
    <div class="gridifier" #gridifier>
      <ng-content></ng-content>
    </div>
  `
})
export class Gridifier {
  @ViewChild('gridifier') gridifier;
  ngOnInit() {
    var grid = new (<any>window).Gridifier(this.gridifier.nativeElement, {
      query: '> div',
      dragifier: true
    })
    grid.append(grid.collectNew())
  }
}
Daniel
@gaiottino
Ah. There's an annotation I've not seen yet. Thanks. Gonna head over to the docs :)
@ericmartinezr get an error Cannot read property 'nativeElement' of null. Tried inside ngAfterViewInit as well but same result
Eric Martinez
@ericmartinezr
make a plnkr
@gaitottino Oh, yeah, it must be on ngAfterViewInit http://plnkr.co/edit/Pm268dYmQ6lu9BvPH6kr?p=preview
Daniel
@gaiottino
ah. and #gridifier. Thanks
AngryPowman
@AngryPowman
Hey guys, is there angular material suitable for desktop app development?
Daniel
@gaiottino
@ericmartinezr how would I update that gridifier to run once ng-content changes? If the contents are rendered from a promise
Vlado Tesanovic
@vladotesanovic
@AngryPowman take a look on this example https://github.com/auth0/angular2-electron
Daniel
@gaiottino
Ok. So I found ngAfterContentChecked. But moving grid.append(grid.collectNew()) there just seems to call ngAfterContentChecked in an infinite loop. :-/
AngryPowman
@AngryPowman
@vladotesanovic Thanks, I am using electron for my solution with AngularJS, and now i am looking for an UI framework which is best for it.
choeller
@choeller

Hi guys! I'm just having kind of a mental problem understanding the basics of Observables... So my question basically boils down to one thing: So in this Rx.js world we have an Observable that represents the datasource. Now I can subscribe an Observer to that Observable - so in my understanding the Observer is the function that I pass to the "subscribe"-method... is that correct? If so, I just dont get this syntax:

Observable.create((observer) => {
      observer.next(5);
      observer.next(10);
    })

Why is the "thing" that emits the new values the observer?! can anyone put that in simple words for an rxjs newbie? :grimacing:

@gaiottino did you already try ngAfterContentInit?
I think ngAfterContentChecked is called every time change detection runs...
Daniel
@gaiottino
@choeller since the content is updated async, the child elements werent available in ngAfterContentInit but i think I might have to make a service from it.
It seems that ngAfterContentChecked is being triggered excessively when a mouse listener is active. hmm.
choeller
@choeller
@gaiottino hmm, I see... do you have a plnkr of that?
@fxck I already watched it :grimacing: I guess I understand most of it, but what I still really don't get is that Observable.create() syntax
Daniel
@gaiottino
Is this a bug? Mouse move the red square. Should check be done all the time? Makes using external libs that listen to mouse movements more or less unusable. http://plnkr.co/edit/btcVt7K9zIxaAxJrQ2ef?p=preview
ROne
@ravi-mone
Hello Team,
For me 'Batarangle' debbuger tool is not working, I am using ubuntu machine
Do any body have suggestions of other debuggers if any
Ricardo Reis
@rjmreis
@choeller thats an arrow function, new in ES6
Eric Martinez
@ericmartinezr
@gaiottino is not a bug, it's just the change detector doing its job. The same happens with ngAfterViewChecked. When you listen to an event it has to assume you're changing something, so it runs part of the lifecycle hooks to check it.
ROne
@ravi-mone
@ericmartinezr , can you please give the order of execution of life cycle hooks of component and route hooks , some thing as explained with angular1
http://stackoverflow.com/questions/20663076/angularjs-app-run-documentation
Eric Martinez
@ericmartinezr
I don't know the exact order. Just put a console log in each one and you'll see it
ROne
@ravi-mone
I am going through the documents, but little confusing,
where one or more of the hooks seems like performing same task
Not a bad idea, I will do that console one, thanks
Oleg Korsak
@kamikaze
looks like router has a problem in angular2
please help. Open this site: http://market.bixority.com/ and see that upper "Sign up" link works fine and inner Signu up link doesn't
but... if you will open debugger in browser
and place breakpoint in router.js -> RouterLink.set function