-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Summary
The script details card needs to be setup so the element accepts an input that it can use in the component.
Implementation Details
-
we need to have the details card accept an input for details named
script. To do this, follow the docs https://angular.io/tutorial/toh-pt3#add-the-input-hero-property - you can also look at how the script card in the scripts screen has an input for a script in both the element in script-card-component.html, and then look at how the script-card-component.ts has an @input (make sure to import the Input at the top of the file). -
Now that an input is setup, make sure it works by declaring a dummy script property like
public script1: Script. Initialized it to some random script value in the init method inside the script-details-screen. (you'll need to import the Script interface from../models/script)component. Send this script1 as the input for the component, and then to actually see the input working, update the template for the script-details-card to show the script like{{script | json}}