Sunday, May 21, 2017

backticks at the properties inside an @Component decorator in Angular 4

You may wrap the setting of the "template" property in backticks and at the "styles" property, which is an array of things, any one property may be CSS styles wrapped in backticks. The backticks allow you to have line breaks. For the "template" property you may have a bunch of HTML tags broken up with line breaks. The backticks are a peculiar way to format strings in TypeScript.

 
 

Addendum 5/22/2017: stylesUrls as a property at a component (in contrast to merely "styles") will hold an array of paths to SASS, LESS, or CSS files to loop in.

No comments:

Post a Comment