Discussion for angular (2+) - need help? create a stackblitz with your issue to get help faster using this template: https://stackblitz.com/fork/angular-issue-repro2
AndrewKushnir on image-directive-13.3.x
renovate[bot] on angular
build: update angular (compare)
routerLink
to work in a nested component. I have a root component that has a RouterConfig setting up my routes and the template is only <router-outlet></router-outlet>
. In the child components, I'm trying to use <a [routerLink]="['Comp']">
while no errors get thrown, the href
isn't generated. What's interesting though is that if I inject the Router in the child component's class, I can call this._router.navigate(['Comp'])
and it works just fine. Am I just missing something?
setTimeout
but that still caused many many updates in Angular :-/
Hi guys, I have a question about binding data(ngModel). I am trying to make a simple example:
boot.ts:
import 'reflect-metadata';
import {bootstrap} from 'angular2/platform/browser';
import AppComponent from './app.component';
bootstrap(AppComponent);
app.component.ts:
import {Component} from 'angular2/core';
@Component({
selector:'my-app',
templateUrl: 'templates/app.component.html'
})
export default class AppComponent {
yourName: string = 't1';
test(){
console.log('click');
}
}
app.component.html:
<div>
<label>Name:</label>
<!-- data-bind to the input element; store value in yourName -->
<input type="text" [(ngModel)]="yourName" placeholder="Enter a name here" />
<hr>
<!-- conditionally display `yourName` -->
<h1 [hidden]="!yourName">Hello {{yourName}}!</h1>
<button (click)="test()">Test Click</button>
</div>
the problem is with ngModel always show t1 and never redraw it,
but if I press test button the value is changed it class.
The only different with examples it that I try to build project with Gulp and browserify.
System.import('app').then(...)
then it's not picked up. http://plnkr.co/edit/X2m7Wp0mYQtkUR4M9NNs?p=preview It must be possible to wrap an external script and not have angular react to all listeners.