Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 19:56
    angelaki commented #48237
  • 19:37
    sr5434 commented #48237
  • 19:37
    sr5434 commented #48237
  • 18:37
    timurtuleuov starred angular/angular
  • 18:15
  • 17:32
    RoyHuamanAvila starred angular/angular
  • 17:26
    AshotAleqs starred angular/angular
  • 16:36
    patrickcharlson starred angular/angular
  • 16:22
    alan-agius4 labeled #48239
  • 16:22
    alan-agius4 labeled #48239
  • 16:06
    angular-automatic-lock-bot[bot] locked #47881
  • 16:06
    angular-automatic-lock-bot[bot] commented #47881
  • 16:06
    angular-automatic-lock-bot[bot] locked #47880
  • 16:06
    angular-automatic-lock-bot[bot] commented #47880
  • 16:06
    angular-automatic-lock-bot[bot] locked #47879
  • 16:06
    angular-automatic-lock-bot[bot] commented #47879
  • 16:06
    angular-automatic-lock-bot[bot] locked #47878
  • 16:06
    angular-automatic-lock-bot[bot] commented #47878
  • 16:06
    angular-automatic-lock-bot[bot] locked #47873
  • 16:06
    angular-automatic-lock-bot[bot] commented #47873
YogeshChoudhari
@YogeshChoudhari
yes trying that
Hi Rob
I am adding my app.componant.ts file to can you please check that also
YogeshChoudhari
@YogeshChoudhari
can you please check my uploaded files
Rob Wormald
@robwormald
don't subscribe in the service
YogeshChoudhari
@YogeshChoudhari
than how i'll get data
can you please help me
Rob Wormald
@robwormald
subscribe in the component...
YogeshChoudhari
@YogeshChoudhari
yes is did same
read that closely
YogeshChoudhari
@YogeshChoudhari

export class AppComponent implements OnInit{
public selectedHero: Hero;
public heroes: Hero[];
result: Object;

constructor(private _heroService: HeroService) { }

onSelect(hero: Hero) { this.selectedHero = hero; }

ngOnInit() {
this.getHeroes();
this.getFriends();

}

getHeroes() {

    this._heroService.getHeroes().then(heroes => this.heroes = heroes);

}
getFriends(){
this.result = {friends:[]};
this.result =this._heroService.loadFriendsSuccessFully().subscribe(res => this.result = res);
}
}

same think i did
but still it showing 304 status in fiddler
YogeshChoudhari
@YogeshChoudhari
wow
thanks let me try this
Jayaram Kannan
@Kannaj
hello - i have a project which requires a basic file upload and a webrtc feature. Aside from that - there arent many real-time features provided for the user. I'm confused as to what front end framework i should use. Would something like angular be considered overkill for such an app. I am confused between going angular or backbone/react
Daniel
@gaiottino
What's happened to filter and orderBy? These are pipes that haven't been ported to ng2?
Vlado Tesanovic
@vladotesanovic
@gaiottino No, you must create it on your own.
Louis
@Louis-7
Hi
Anyone know how to get pure HTML in Angular2? When I want to get get parent HTML, there are always some angular selector in it. It's not pure.
Rob Wormald
@robwormald
the question would be why?
Louis
@Louis-7
no, the question is how to get the pure HTML
Sekib Omazic
@SekibOmazic
@robwormald I've changed your plunk like this:
http://plnkr.co/edit/jSkbUbsb9FGie73Y9Ysl
Now I get this ugly Error: Expression 'friends | async in App@4:12' has changed after it was checked
I don't see how friendshas changed. There is only one instance of friends.
Rob Wormald
@robwormald
right - why would you pull it from the DOM though - typically in most frameworks it would be unnecessary
Louis
@Louis-7
I know the selector will appear in HTML, but is there any method or something can help me get the pure HTML?
Rob Wormald
@robwormald
@SekibOmazic there's a bug with behavior subjects currently
not that it really matters, since you can use onPush and it fixes that issue
Aleš
@fxck
@robwormald do you think I'd be worth adding something like .getState() to the store?
Rob Wormald
@robwormald
@Louis-7 there's no such thing as "pure" html in this case
@fxck no
:)
that switches to an imperative API, basically defeats the purpose
Aleš
@fxck
but it's not really convenient to log out the current state with subscribes
Rob Wormald
@robwormald
store.subscribe(v => console.log(v))
?
Aleš
@fxck
console.log(store.getState())
Louis
@Louis-7
@robwormald oh? I don't want to get my selector but the HTML in selector.
Rob Wormald
@robwormald
@fxck that's less convenient, imo
behavior subjects have a .value property you can use
Louis
@Louis-7
there is a Component Reference, I can get innerHTML from it. But children's selector will be include...
Rob Wormald
@robwormald
@Louis-7 what are you trying to accomplish?
@fxck (Store is a BehaviorSubject)
but i'm not going to add an imperative method to do it.
Louis
@Louis-7
I use dynamicComponentLoader load some components into a canvas and I want to get the HTML. (components can also in another components, like nest view)
@robwormald
Sekib Omazic
@SekibOmazic
@robwormald Yes, OnPush fixes that. I understand it like this:
friends | sync "extracts" the list when it arrives and firends.next(newList) would create another list (different reference) and that's why I get that nasty error.
Is this correct?
Aleš
@fxck
well again, I don't think you'd ever use it for something other than debugging, in which case, it feels bit more convenient to call a function on Store, than to have to subscribe to it, or go digging in rx docs to see how to get value out of the subject : )