腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(194)
视频
沙龙
1
回答
@
ViewChild
访问
ngAfterViewInit
-
Ionic5
-
Angular6
中下级
为
空
、
在
ngAfterViewInit
中
访问
本机textarea元素时出现问题 我有这个ElasticTextareaComponent,如果用户有多行,它会增加高度。该区域是一个简单的ion-textarea,需要在其中
访问
原生文本区域元素。ngModel)]="content"</ion-textarea> 在我的.ts文件中,我将孩子初始化为@
ViewChild</
浏览 77
提问于2020-11-11
得票数 0
1
回答
@
viewchild
下拉列表在
ngAfterViewInit
中是未定义的
app.component.ts }) @
ViewChild
("dropdown1", { static: false }) dropdown:
浏览 2
提问于2020-04-05
得票数 0
2
回答
如何在角度2中按ID选择模板元素?
、
、
、
新入角和飞镖我有以下问题:import 'package:angular2/core.dart';import 'dart:html'; selector: 'google-route-map', styleUrls:
浏览 0
提问于2017-01-30
得票数 5
回答已采纳
2
回答
如何将HTML属性转换为类型记录
、
、
我在*.component.html中有一个*.component.html,其属性定义如下: [pageSize]="10" (page)="onPaginateChange($event)">是否有可能将属性pageSize放到我的*.component.ts中?谢谢!
浏览 1
提问于2018-09-03
得票数 2
回答已采纳
1
回答
如何以角度
访问
另一个组件的DOM元素?
、
在其中的几个页面中,我需要
访问
导航或页脚的DOM元素,以便进行粘性定位,比如pageYOffset、高度等等。我知道像
ViewChild
、Renderer2和ElementRef这样的东西,但不太确定它是如何工作的。我是否创建服务?那看起来会是什么样子?
浏览 2
提问于2018-10-23
得票数 3
回答已采纳
1
回答
如何从子组件Angular 2的属性中收集数据
、
、
、
因此,问题是如何从模板中子组件的属性中收集数据到父组件。父模板如下所示: <blocks-banners-slideshow class="contentBlock" [zone]="'main'" [slideOptions]="{loop:true}"></blocks-banners-slideshow> <blocks-catalog-category class="contentBlock" [root]="0"
浏览 10
提问于2016-09-20
得票数 1
回答已采纳
1
回答
如何从component.ts触发p-tree中的(onNodeSelect)事件?
、
、
下面是我尝试使用
viewchild
概念的方法<p-tree #myDiv [value]="files" selectionMode="single" [(selection)]="selectedFiles
浏览 3
提问于2021-11-03
得票数 1
4
回答
无法读取Angular 7中未定义的属性'nativeElement‘
jquery.js",] 这是我的代码 import { Component, OnInit,
ViewChild
, ElementRef } from '@angular/core'; dataTable: any; ngOnInit
浏览 17
提问于2019-06-29
得票数 0
2
回答
聚焦克隆元素
、
mat-raised-button class="full-width" color="primary">Invite</button>import {Component, OnInit,
ViewChild
/add-user.component.sass'] @
ViewChild
('emailTmpl') emailTmpl;
浏览 1
提问于2018-07-23
得票数 1
回答已采纳
1
回答
访问
ng-template中的模板引用变量
、
、
、
、
我有一个模板引用变量
为
content的模态,在该模态模板中,我有另一个模板变量oppGrid。我想
访问
oppGrid的elementRef,但我遇到了问题,它似乎是
空
的。即使当我尝试使用ngAfterContentInit()和
ngAfterViewInit
()时也是如此。那么,如何在#oppGrid中
访问
和执行DOM操作,ng模板中的模板引用变量?undefined ngAfterContentInit(){ console.log(this.oppGrid);/
浏览 24
提问于2021-09-05
得票数 0
1
回答
我在本地文本中管理跨ng2组件的UI引用
、
this.page = <Page>topmost().currentPage; } this.child.setPage(this.page);}setPage(page: Page) {}现在我有了这个B
浏览 4
提问于2016-06-08
得票数 1
回答已采纳
2
回答
Angular 10 -支持
ViewChild
获取实例,而不考虑静态属性
、
@
ViewChild
装饰器有没有办法在ngOnInit中获得子组件的实例,就像从angular 6的旧@
ViewChild
中一样?我试过这样的方法: @Component({}) @
ViewChild
(HelloComponent, {static: true}) hello: HelloComponent; n
浏览 43
提问于2020-10-16
得票数 1
1
回答
Angular 2如何编辑元素名称?
、
、
、
我已经很困惑了..。我想通过单击按钮来创建编辑元素名称的功能。所有元素都存储在存储中。在我的情况下如何做到这一点。<ion-list> <p class="list_geo"> {{ place.title }}</p> <button
浏览 3
提问于2017-05-31
得票数 0
2
回答
角-
ViewChild
对document.querySelector
我寻找在角度上
访问
DOM元素的正确方法。 myDOMElement = document.querySelector(
浏览 6
提问于2022-05-01
得票数 -1
1
回答
在角2中
访问
部件中的局部变量失败
、
、
代码: selector: 'json-editor',json-editor-container"></div>}) @
ViewChild
('container') private
浏览 3
提问于2016-03-03
得票数 0
回答已采纳
4
回答
ViewChild
in Angular2是什么?
、
、
一个
ViewChild
这个解释非常小,我仍然不太明白它是用来做什么的。删除@
ViewChild
(TodoInputCmp)对TodoInputCmp中的代码没有影响谢谢
浏览 6
提问于2016-04-14
得票数 30
回答已采纳
8
回答
如何使用新的静态选项@
ViewChild
在角8?
、
、
@
ViewChild
('searchText', {read: ElementRef, static: false})vs @
ViewChild
浏览 1
提问于2019-05-29
得票数 305
回答已采纳
2
回答
Angular 4获取dom元素
、
、
现在我正在尝试使用@
ViewChild
获取它,我总是得到未定义的值。 @Output() onSave = new EventEmitter();
浏览 31
提问于2017-07-30
得票数 6
回答已采纳
3
回答
角v8 -@视图子静态真或假
、
、
根据角的,一个核心变化是(我引用):我的问题是什么时候应该将这个属性(静态)设置
为
true?
浏览 0
提问于2019-07-09
得票数 16
回答已采纳
1
回答
如何在嵌套组件中使用ng内容
如何在嵌套组件中使用ng-content?<div class="body"> </div><ng-content select="footer"></ng-content>app.component.html: <h1>Hi&
浏览 1
提问于2021-05-12
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
轻量级.NET Core 快速开发框架OSharpNS发布
热门
标签
更多标签
云服务器
ICP备案
对象存储
实时音视频
即时通信 IM
活动推荐
运营活动
广告
关闭
领券