当您为某些网站保存了用户名和密码时,Chrome会自动填充该用户名和密码,但如果您尝试获取密码输入字段的值,则为空字符串,即使有值的******.
如果单击页面上的某个位置,则无需input type="password"填写值的值.
这是fiddle 用户/传递 html和console.log命令的结构.它在这里看不到,但它可以在每个具有登录表单的页面上重现,并且用户名和密码在页面加载时自动填充.如果在单击站点上的任何其他位置之前检查字段的值,则它将为空String.
在Firefox或Internet Explorer中,情况并非如此,它将input使用密码填充元素的值.
我使用的是Windows 7旗舰版64位操作系统,谷歌Chrome版本为48.0.2564.97米
这是正常的行为,bug还是?
更新:
如果单击F5重新加载页面并检查密码字段,则密码值将在那里.如果您点击左上角Chrome中的重新加载按钮,则密码字段的值将为空字符串.
使用Angular-cli时,构建的文件名是main.[hash] .bundle.js使用时ng build -prod
是否可以从该文件名中删除哈希.那么main.bundle.js呢?
我正在使用Angular 4进行应用程序开发.我需要检查网络连接是否可用,因为它有使用Angular for的任何连接问题.是否可以使用Angular 4.
我查了一下https://github.com/HubSpot/offline.我认为这对角4不起作用.任何人请建议.这是否可以为Angular 4或任何其他替代品使用offlinejs?
谢谢Sarath CM
有没有办法看到变量在内存中的位置?
例如,在ActionScript中,在调试模式下,您可以看到变量的内存位置
我正在使用Google Chrome开发人员工具,我可以在调试模式下查看变量,但没有关于变量内存位置的信息.
有没有显示可变内存位置的浏览器工具?
如果我执行以下操作:
$('.js-element').attr("data-count", 2)
Run Code Online (Sandbox Code Playgroud)
然后我可以使用CSS显示该值:
.js-element:after {
content: attr(data-count);
}
Run Code Online (Sandbox Code Playgroud)
但如果我做以下事情:
$('.js-element').data("count", 2)
Run Code Online (Sandbox Code Playgroud)
然后相同的CSS代码什么也没显示.
我理解的不同之处在于,在第一种情况下,我只是在HTML元素上设置了一个属性,我恰好在数据前缀,而在第二种情况下,我正在设置HTML元素的数据集属性.
我的问题是:
我在我的应用程序中发出一个简单的http请求.
我正在使用Angular 2 Quickstart并将我的所有角度包更新为4.3.4
这是我的 package.json
{
"name": "angular-quickstart",
"version": "1.0.0",
"description": "QuickStart package.json from the documentation, supplemented with testing support",
"scripts": {
"build": "tsc -p src/",
"build:watch": "tsc -p src/ -w",
"build:e2e": "tsc -p e2e/",
"serve": "lite-server -c=bs-config.json",
"serve:e2e": "lite-server -c=bs-config.e2e.json",
"prestart": "npm run build",
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
"pree2e": "npm run build:e2e",
"e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
"preprotractor": "webdriver-manager update",
"protractor": "protractor protractor.config.js",
"pretest": "npm run … 太棒了;拖动 SVG 会导致其旋转和平移。
我正在尝试使用 D3 (v.4) 作为 Angular 服务的一部分在 SVG 组上实现拖动和缩放事件。
this.unitGroup = this.svg.append('g')
.attr('id', 'unitGroup')
.call(this.drag)
.call(this.zoom);
Run Code Online (Sandbox Code Playgroud)
拖动可平移 SVG。
drag = d3.drag()
.on('start', () => {
console.log('drag start');
this.setClickOrigin(d3.event);
})
.on('drag', (d, i, n) => {
const target = d3.select(n[i]).node() as any;
const m = target.getCTM();
const x = d3.event.x - this.clickOrigin.x;
const y = d3.event.y - this.clickOrigin.y;
this.setClickOrigin(d3.event);
this.translate(target, x, y);
});
Run Code Online (Sandbox Code Playgroud)
缩放时会旋转 SVG。
zoom = d3.zoom()
.on('zoom', (d, i, n) => {
const target = d3.select(n[i]).node() as …Run Code Online (Sandbox Code Playgroud) 我是Angular2的新手。我说过要通过互联网上的资源来学习。
我正在使用Angular-Cli工具来构建测试应用程序。
当我发出命令时,ng serve --open我的示例项目在默认端口4200上运行,控制台显示,
** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200 **
Run Code Online (Sandbox Code Playgroud)
现在我对NG Live Development Server非常困惑。
我有以下担忧,
作为客户端框架,为什么angular需要开发服务器。
Live Server实际位于运行的计算机中的位置
有人可以提供您对此的想法吗?如果我错误地理解了这些概念,请纠正我。
npm ERR!从npm @ 5开始,npm缓存会因损坏问题而自我修复,并且保证从缓存中提取的数据是有效的。如果要确保所有内容都一致,请改用“ npm cache verify”。npm ERR!npm ERR!如果确定要删除整个缓存,请使用--force重新运行此命令。
npm ERR!可以在以下位置找到该运行的完整日志:npm ERR!C:\ Users \ janak \ AppData \ Roaming \ npm-cache_logs \ 2017-08-11T04_38_31_995Z-debug.log
我正在尝试从json文件读取数据,但遇到了一些麻烦。如何将项目从json文件获取到单个项目?
我的json文件:
[
{
"UserName": "test@test.en",
"Password": "tests123"
}
]
Run Code Online (Sandbox Code Playgroud)
我的方法:
element(by.name('username')).sendKeys(browser.params.UserName);
element(by.name('password')).sendKeys(browser.params.Password);
Run Code Online (Sandbox Code Playgroud)
结果我得到了
Failed: each key must be a number of string; got undefined
Run Code Online (Sandbox Code Playgroud) 我正在寻找图Javascript库来为我的有角项目创建某种顶级动态框图。有人可以告诉我美人鱼是否可以与Angular 4兼容吗?也请让我知道是否还有其他好的图表库需要处理。谢谢!
angular ×7
javascript ×6
node.js ×2
typescript ×2
angular-cli ×1
css ×1
d3.js ×1
debugging ×1
html ×1
jquery ×1
json ×1
mermaid ×1
npm ×1
protractor ×1
svg ×1
systemjs ×1
web ×1