Top "Angular2-template" questions

For questions referencing Angular Template Syntax including: interpolation, input(property) bindings, output(event) bindings, two-way binding, local variables, star syntax, etc.

Format number of seconds as mm:ss in Angular 2

I am displaying a number of seconds that counts down from 3600 to 0. <div class="time-box" *ngIf="p.value.playerTimer &…

angular angular2-template
How to init a component only when its tag is at `*ngIf=true`?

Update: Günter Zöchbauer provided a very acceptable answer that works perfectly (and thank you!). But I still have …

angular angular2-template angular2-directives
How to call function on input text change in angular 2

I want to call the type script function on input change of text box, and its working for me. But …

typescript angular2-template angular2-components
Why angular 2 ngOnChanges not responding to input array push

My angular application stuck with a issue, i used input as array and pushed a value to the array when …

angular angular2-template ngonchanges
How to use multiple ng-content in the same component in Angular 2?

I would like to display different template in my component. Only one will show. If hasURL is true, I want …

javascript angular angular2-template angular2-directives
Using number pipe throws InvalidPipeArgumentException (Invalid argument '1' for pipe 'DecimalPipe')

I want to write some number into <input> and dynamically display it as a decimal inside {{}} through pipe. …

typescript angular angular2-template angular2-pipe
drop event not working angular 2

I'm building upload component in angular 2 and i stumble into problem. (drop) event is not working. This is my implementation &…

angular angular2-template
Angular2 data binding for custom reusable component

I want to have a template consisting of a label and textbox. This template can be reused at different places …

angular angular-ngmodel angular2-template angular2-forms
jit_nodeValue_4(...).$any is not a function Angular5

ERROR TypeError: jit_nodeValue_4(...).$any is not a function at Object.eval [as handleEvent] (AddNewConnectionsComponent.html:42) at handleEvent (core.js:13581) …

angular angular5 angular2-template angular2-forms angular4-forms
Angular 2 disable sanitize

I am trying to render base64 string into <img src='data:image/png;base64,${Here}'. But always when …

angular typescript sanitization angular2-template