腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
1
回答
angular
6
创建
TemplateRef
实例
、
、
、
我有(
angular
6
)组件和
TemplateRef
<any>类型的输入参数 @Input() tpl:
TemplateRef
<any>;...现在我想
创建
一个测试,但我找不到如何在测试中
创建
模板并将其设置为输入域的方法。TestComponent);component.template = here I need inst
浏览 10
提问于2018-08-02
得票数 5
1
回答
Angular
9:如何从
templateRef
访问子组件
实例
、
在
angular
8中,我能够从
templateRef
访问子组件,如下所示: <child-component></child-component现在,我将以下属性视为
templateRef
的一部分 -> elementRef -> _declarationView现在如何访问
angular
9中的子组件
浏览 5
提问于2021-11-01
得票数 1
1
回答
角
6
结构指令
、
我已经尝试了一个简单的结构指令,有角度的
6
,你可以。我
创建
了一个项目,然后生成了一个新的指令。该指令被添加到@NgModule的解密部分。, ViewContainerRef} from '@
angular
/core'; selector: '[appHasPermission]'export class); constructor(private
templateRef
:
TemplateRef
<
浏览 0
提问于2018-08-27
得票数 0
1
回答
了解
angular
/typescript setter属性
、
、
我
创建
了以下
Angular
2指令: this.vcRef.createEmbeddedView(this.
templateRef
) this.vcRef.clear(); } constructor(pr
浏览 0
提问于2017-10-31
得票数 0
1
回答
AngularDart结构指令添加自定义内容
我正在尝试为材料按钮组件
创建
指令,通过点击enter键为提交表单添加隐藏的经典按钮。我需要将简单的html添加到_viewContainer中,如下所示 import 'package:
angular
/
angular
.dart'; selector: '[kpMaterialSubmit]',class KpMaterialSubmit { fina
浏览 14
提问于2020-03-28
得票数 1
1
回答
如何在每个ng内容上添加一些文本?
<app-component [date]="'13.10.2022'"> </app-component > <h1>{{date}}<
浏览 1
提问于2022-10-13
得票数 0
1
回答
创建
自定义结构指令
、
一周前,我已经开始学习
Angular
2和最新的
angular
4,现在我需要
创建
一个自定义结构指令,以显示其中的内容。说明:我有一对字符串数组的元素,让我们调用数组标题的n个元素的第一个元素,第二个描述,这是结果现在,如果我调用我需要
创建
的结构指令,我希望它显示我将在该调用下编写的内容, ViewContainerRef } from "@
angular
/core"; selector:
浏览 0
提问于2017-05-24
得票数 4
回答已采纳
1
回答
是否可以制作一个可重用的图标组件,而不
创建
重复的TemplateRefs?
、
我尝试
创建
一个IconComponent,根据传入的字符串显示不同的SVG图标。但是,我认为这种方法为IconComponent的每个
实例
创建
了一个新的和唯一的IconComponent,这将在内存中
创建
无用的数据重复。} from "@
angular
/core"; selector: "app-icon", templateUrl: ".
浏览 0
提问于2021-01-26
得票数 1
回答已采纳
1
回答
拥有一个可变的templateUrl
、
、
、
import { Component } from "@
angular
/core"; selector: "grote-kerk", templateUrl: "pages
浏览 0
提问于2017-02-28
得票数 0
2
回答
自定义if指令不显示预期结果
、
、
、
在本教程中我正在学习如何
创建
一个定制的指令。} from '@
angular
/core'; selector: '[myCustomIf]'export class MyCustomeIfDirective{ constructor(private
templateRe
浏览 2
提问于2021-04-02
得票数 0
回答已采纳
1
回答
如何处理全局/应用范围模板
、
、
我需要在许多组件中重用参数化菜单模板来构建本地菜单。... does magic :)我试着提取这部分但不起作用,没有任何错误。提前谢谢你,
浏览 2
提问于2021-01-29
得票数 0
回答已采纳
1
回答
如何访问角8/9/10/11可重用构件中的子模板
、
、
、
、
我已经
创建
了通用组件,它将以表格格式呈现数据。Preparing list for rows{"id":5,"title":"Air Gas Guideline","type":"PPT"}, {"id":
6
,
浏览 1
提问于2020-12-18
得票数 3
回答已采纳
3
回答
如何通过变量调用ng-template?
、
features是一个枚举,其中的值与我的模板名称匹配...然后在我的课堂上,我试着像这样抓取所有的ViewChildren: @ViewChildren(
TemplateRef
) templates: QueryList<
TemplateRef
<any>>;所以我的想法是,我认为我应该能够通过执行templates[feature]引用正确的模板,这应该会产生类似templates
浏览 0
提问于2019-06-21
得票数 1
2
回答
有一种简单的方法可以覆盖基本指令吗?
、
我正在寻找一种简单的方法来覆盖提供的指令的行为,例如ngIfP.S.:我知道覆盖标准功能是非常糟糕的实践,但我这么做只是为了学习/研究目的。
浏览 0
提问于2018-12-28
得票数 1
1
回答
如何使用
Angular
2指令注入DOM元素?
、
我想
创建
一个
Angular
2指令,当用户悬停在列表项上时,可以显示工具提示。
Angular
2文档看起来如下所示:export class UnlessDirective { private
templateRef
:
TemplateRef
<any>, ) { }t
浏览 4
提问于2017-02-07
得票数 1
回答已采纳
1
回答
Angular
2:嵌入模板上任何指令都不使用的属性绑定权限
、
我在
angular
2中
创建
了一个指令。但是,不工作并返回错误模板解析。我的指令:import {
TemplateRef
, ViewContainerRef } from'@
angular
/core'; import {CookieService} from '
angular
2-cookie/core
浏览 2
提问于2016-12-28
得票数 1
1
回答
Angular
2:*ngIf是一次性绑定吗?
、
我正在
创建
一个DOM结构,只想在第一时间在一些可视化组件中添加一些部分,不想让它们一次又一次地刷新,这就是*ngIf的工作方式。这是为了避免绑定一次又一次地执行,因为我知道一旦
创建
就永远不会改变。换句话说,
Angular
1有::操作符来帮助实现这一点。
Angular
2中是否有针对*ngIf的一次性绑定?如果这是在其他问题中讨论的,请给我指出问题。
浏览 0
提问于2017-03-27
得票数 9
1
回答
以字符串为输入的
angular
2结构指令
、
、
我正在尝试用给定的示例
创建
一个结构指令 </a>import { Directive, Input } from '@
angular</
浏览 0
提问于2016-09-10
得票数 2
回答已采纳
1
回答
创建
一个类似于primeng表的自定义表
、
、
、
现在我们尝试
创建
一个自定义的。我需要一个表与复选框,我不需要排序,分页,过滤器和其他功能。 <td>{{ data.slug }}</td> </ng-template>我想要
创建
一个像这样绑定的
浏览 2
提问于2022-04-01
得票数 1
1
回答
从组件角2获取ng-模板
、
、
怎样才能得到角为2的元素?如果我在html中有这个 <div class="modal-header">Header</div> <div class="modal-footer">footer</div> </ng-template>
浏览 0
提问于2017-05-16
得票数 6
点击加载更多
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券