Hello,
I am working on an AngularJs typescript application (**AngularJs 1.7.8**).
Somehow, a variable is not updated in the template.
My AngularJs component:
export class AppComponent {
// Define our AppComponent's name
static componentName: string = "msApp";
// Define our AppComponent's config
static componentConfig: ng.IComponentOptions = {
bindings: {},
controllerAs: 'vm',
controller: AppComponent,
templateUrl: 'src/components/start-app/start-app.component.html'
};
aParam: string;
searchCallback(param: string) {
this.aParam = param;
}
within the HTML template:
'{{vm.aParam}}'
When the `searchCallback` is invoked, the template doesn't update
`vm.aParam`. I suspect it is a change detection issue because if I
initialize `aParam` in the controller as follows:
aParam: string = 'foo';
then the template does display 'foo'.
Can someone please help?
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/angular/20ca7d9b-54aa-4db8-8acd-903ec06916e8n%40googlegroups.com.