You can also access the object from within your controller/class.
It's not accessible via the constructor because it's too early in the
lifecycle. Basically, you're trying to access a value that hasn't been
initialized yet. Instead, you can access it during onInit().
ngOnInit() {
console.log(this.foo)
}
You're probably aware of the change but 'properties' has been changed to
'inputs'
@Component({
selector: 'component-two',
template: '{{foo}}',
inputs: ['foo']
})
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.