All Questions

137
votes
3answers
76669 views

Angular 2 dynamic tabs with user-click chosen components

I'm trying to setup a tab system that allows for components to register themselves (with a title). The first tab is like an inbox, there's plenty of actions/link items to choose from for the users, an...
24
votes
4answers
5708 views

How do I return the response from an Observable/http/async call in angular2?

I have service which returns an observable which does an http request to my server and gets the data. I want to use this data but I always end up getting undefined. What's the problem? Service: @Inj...
166
votes
18answers
47641 views

What is the correct way to share the result of an Angular Http network call in RxJs 5?

By using Http, we call a method that does a network call and returns an http observable: getCustomer() { return this.http.get('/someUrl').map(res => res.json()); } If we take this observab...
107
votes
9answers
75895 views

How can I use/create dynamic template to compile dynamic Component with Angular 2.0?

I want to dynamically create template. This should be used to build a ComponentType at Runtime and place (even replace) it somewhere inside of the hosting Component. Until RC4 I was using ComponentR...
117
votes
24answers
75857 views

Angular 2.0 router not working on reloading the browser

I am using Angular 2.0.0-alpha.30 version. When redirect to a different route, then refresh the browser , its showing Cannot GET /route. Can you help me with figuring why this error happened.
245
votes
9answers
252615 views

How can I select an element in a component template?

Does anybody know how to get hold of an element defined in a component template? Polymer makes it really easy with the $ and $$. I was just wondering how to go about it in Angular. Take the example ...
42
votes
1answers
25179 views

In RC.1 some styles can't be added using binding syntax

Styles like <div [style.background-image]="\'url(\' + image + \')\'">Background</div> <div [style.transform]="rotate(7deg)" are not added anymore
88
votes
8answers
40226 views

Equivalent of $compile in Angular 2

I want to manually compile some HTML containing directives. What is the equivalent of $compile in Angular 2? For example, in Angular 1, I could dynamically compile a fragment of HTML and append it t...
18
votes
1answers
4810 views

Firebase query if child of child contains a value

The structure of the table is: chats --> randomId -->--> participants -->-->--> 0: 'name1' -->-->--> 1: 'name2' -->--> chatItems etc What I am trying to do is query the chats table to find all th...
355
votes
15answers
206619 views

Angular HTML binding

I am writing an Angular application, and I have an HTML response I want to display. How do I do that? If I simply use the binding syntax {{myVal}} it encodes all HTML characters (of course). I need s...

Previous Next