You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Scott Aslan (JIRA)" <ji...@apache.org> on 2019/06/04 19:50:00 UTC
[jira] [Updated] (NIFIREG-277) UI - Allow for consistent angular
template/templateUrl inclusion between JS and TS.
[ https://issues.apache.org/jira/browse/NIFIREG-277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Aslan updated NIFIREG-277:
--------------------------------
Fix Version/s: 0.5.0
> UI - Allow for consistent angular template/templateUrl inclusion between JS and TS.
> -----------------------------------------------------------------------------------
>
> Key: NIFIREG-277
> URL: https://issues.apache.org/jira/browse/NIFIREG-277
> Project: NiFi Registry
> Issue Type: Bug
> Reporter: Robert Fellows
> Assignee: Robert Fellows
> Priority: Major
> Fix For: 0.5.0
>
>
> 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)