For example, a parent component can pass in a value to its child component like below in its html file:
[name]='Ben'
As I'm trying to do several tests with a whole bunch of properties, is there a way to do it more efficiently besides doing it via query parameters? Could I do it via the console instead by placing an observable and maybe there's a function I can call in the console that takes in json format. So for example i can call this in the console:
dothis("listOfThings":[{"name":'Ben', "age":'30'}])
Thanks,
Ben
One way to go after this could be:
By the way, your first example is data binding:
[name]='Ben'
If you don't use @Input you won't pass anything from parent to child. Here is an example . Maybe you are familiar with this. Forgive me if this is redundant.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.