无法将模板文件用作Liferay角度portlet中组件的模板

问题描述 投票:0回答:1

无法将模板文件用作Liferay角度portlet中组件的模板。相同的语法在普通角度应用程序中也可以正常工作。

app.component.ts

import { Component } from '@angular/core';

@Component({
    templateUrl: './app.component.html'
    /*
     * I've tried to pass template file path as below but it wasn't worked
     * templateUrl: './app.component.html'
     * templateUrl: './app.component'
     * templateUrl: 'app.component.html'
     * templateUrl: 'app.component'
     */
})

export class AppComponent {}

app.component.html] >>

<h1>app component loaded using template file.</h1>

下面是我的环境详细信息

  • OS:Windows
  • Liferay
  • :liferay-ce-portal-tomcat-7.3.2-ga3
  • node
  • :v8.12.0
  • angular / cli
  • :^ 1.6.7
  • angular / compiler-cli
  • :^ 5.0.0
  • liferay-npm-bundler
  • :2.18.2
  • 打字稿
  • :2.4.2

    Unable to use the template file as a template for the component in Liferay angular portlet

无法将模板文件用作Liferay角度portlet中组件的模板。相同的语法在普通角度应用程序中也可以正常工作。 app.component.ts import {组件} ...

angular typescript liferay portlet liferay-7
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.