[ 
https://issues.apache.org/jira/browse/NIFI-6351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Scott Aslan resolved NIFI-6351.
-------------------------------
    Resolution: Fixed

> Allow for consistent angular template/templateUrl inclusion between JS and TS.
> ------------------------------------------------------------------------------
>
>                 Key: NIFI-6351
>                 URL: https://issues.apache.org/jira/browse/NIFI-6351
>             Project: Apache NiFi
>          Issue Type: Task
>          Components: FDS
>            Reporter: Robert Fellows
>            Assignee: Robert Fellows
>            Priority: Major
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> In the JS files, we can
> {noformat}
>   import template from './my-component.html'
> {noformat}
> and then reference that template in the component declaration.
> However, if you try to do the same thing in a TS file, you get:
> "Error: No template specified for component X"
> at runtime. This can be solved by using:
> {noformat}
>   const template = require('./my-component.html')
> {noformat}
> However, this would just be an inconsistency in how we define the components 
> purely based on the file type.
> One solution is to standardize on templateUrl in the component declaration
> {noformat}
>   templateUrl: './my-component.html'
> {noformat}
> And then chain a custom webpack loader for both file types that finds any 
> reference to {{tempateUrl: './component.html'}} and converts it at build time 
> to {{template: require('./component.html')}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to