我按照谷歌的说明操作:https://developer.chrome.com/devtools/docs/remote-debugging.我也经历了故障排除部分 - 但似乎没有任何效果.
我有三星galaxy 3(android 4.1.2,chrome 42.0.2311.111).USB调试已启用.我已经尝试重启USB设备几次后重启设备.
在Windows 8上我运行chrome(44.0.2388.0 canary).我安装了三星USB驱动程序,我的电脑可以看到我的设备.
插入设备时或使用检查页面打开金丝雀时,我都没有收到任何通知.我错过了什么吗?
我正在使用量角器进行测试.99%的时间没有必要真正看到浏览器,测试需要很长时间,而我们感兴趣的是最终结果.有没有办法隐藏为测试打开的浏览器(例如在后台运行)?
我试图使用babel-loader与babel-plugin-transform-runtime.
我按照以下说明操作:https: //github.com/babel/babel-loader#babel-is-injecting-helpers-into-each-file-and-bloating-my-code
相关代码:
rules: [
// the 'transform-runtime' plugin tells babel to require the runtime
// instead of inlining it.
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['@babel/transform-runtime']
}
}
}
]
Run Code Online (Sandbox Code Playgroud)
我在构建时遇到以下错误:
Module build failed: Error: Cannot find module '@babel/plugin-transform-runtime'
如果我将插件名称更改为:plugins: ['transform-runtime'],则会出现以下错误:
Module build failed: TypeError: this.setDynamic is not a function
问题是什么?
我终于让他的dev服务器运行了,我在屏幕上得到了一些东西.我为NPM设置了一个"启动"脚本,如下所示:
"start": "webpack-dev-server --content-base app"
Run Code Online (Sandbox Code Playgroud)
我收到一个错误:
http://localhost:8080/bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)
Run Code Online (Sandbox Code Playgroud)
我的文件夹设置如下:
appDir
->app
->node_modules
webpack.config.js
package.json
Run Code Online (Sandbox Code Playgroud)
我的webpack.config.js:
module.exports = {
context: __dirname + '/app',
entry: './index.js',
output: {
path: __dirname + '/app',
filename: './bundle.js'
}
}
Run Code Online (Sandbox Code Playgroud)
你能说出什么问题吗?
我有一个具有 3 种可能状态的按钮:
按钮的代码是这样的:
<button mat-raised-button
color="primary"
[disabled]="anotherStarted"
(click)="startButton = true">START</button>
Run Code Online (Sandbox Code Playgroud)
该按钮是primary可点击的。当另一个进程启动时它被禁用。
我从文档中无法弄清楚如何更改其颜色以表明它现在处于活动状态(例如,当 startButton 为 true 时)。
有没有办法做到这一点?
我在同一页面上有两个指令,但是在不同的元素上.像这样的东西:
<div directive-one>
<div directive-two></div>
</div>
Run Code Online (Sandbox Code Playgroud)
在directiveOne中,我创建了一些变量(比方说$scope.pageConfig.variable).我想使用directiveTwo来使用这个变量.
问题 - directiveOne并不总是在directiveTwo之前加载.
问题是 - 有没有办法确保directiveOne在directiveTwo之前加载,以便变量可用于directiveTwo?
谢谢 :)
更新:我发现答案应该是使用directiveOne中的控制器,如下所示:
return {
controller: function($scope){ $scope.variable = variable; },
link : ...
}
Run Code Online (Sandbox Code Playgroud)
问题是我以这种方式使用它时会收到错误[$ injector:unpr].这应该解决我的问题吗?知道为什么这会给我造成错误吗?
我使用webpack克隆了一个egghead项目(很棒的教程).我遇到了以下错误:
0 info it worked if it ends with ok
1 verbose cli [ 'c:\Program Files\nodejs\\node.exe',
1 verbose cli 'c:\Program Files\nodejs\nodemodules\npm\bin\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose node symlink c:\Program Files\nodejs\node.exe
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart webpack-angular@1.0.0
7 info start webpack-angular@1.0.0
8 verbose unsafe-perm in lifecycle true
9 info webpack-angular@1.0.0 Failed to exec start script
10 verbose stack Error: webpack-angular@1.0.0 start: `node nodemodules/.bin/webpack-dev-server --content-base app …Run Code Online (Sandbox Code Playgroud) 我正在使用 Firebase 电子邮件和密码身份验证。
我可以在 Firebase 控制台中看到该用户,并且该用户可以登录和注销。
在我的代码中,我正在这样做:
const signInMethods = await fetchSignInMethodsForEmail(getAuth(), email);
Run Code Online (Sandbox Code Playgroud)
但是signInMethods是一个空数组(与预期相反['password'])。
知道为什么会发生这种情况吗?
预期行为: 返回的值fetchSignInMethodsForEmail应反映刚刚注册的用户可用的登录方法password。
实际行为:返回的值fetchSignInMethodsForEmail是一个空数组。
复制说明:
add-firebase-auth去分行结账
添加包含.env以下详细信息的文件:启用了电子邮件和密码登录的 Firebase 应用的 VITE_FIREBASE_APP_KEY=*** VITE_FIREBASE_MESSAGING_SENDER_ID=*** VITE_FIREBASE_PROJECT_ID=*** VITE_FIREBASE_APP_ID=*** (将 *** 替换为实际详细信息)
跑步npm i
跑步npm run dev
转到控制台中指定的地址查看 UI
输入电子邮件和密码并登录。
查看用户是否出现在 Firebase 控制台中
刷新应用程序以返回登录屏幕
auth.ts在文件第 10 行设置调试点。
使用相同的凭据登录
看到返回的值是一个空数组
javascript ×5
webpack ×3
angularjs ×2
android ×1
angular ×1
babel-loader ×1
e2e-testing ×1
firebase ×1
inspect ×1
node.js ×1
protractor ×1