$a = JFactory::getApplication('site');
Run Code Online (Sandbox Code Playgroud)
我在Joomla API中遇到过这个问题:
static JApplication getApplication ([mixed $id = null], [array $config = array()], [string $prefix = 'J'])
Run Code Online (Sandbox Code Playgroud)
$ id,$ config和$ prefix的示例是什么?
import { Component, ViewChild } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<div #container>
<p>para 1</p>
<p>para 2</p>
<button>button 1</button>
</div>
`
})
export class AppComponent {
@ViewChild('container') myDiv;
ngAfterViewInit(){
//this console.log would print this [p, p, button]
console.log(this.myDiv.nativeElement.children);
//how can I access to only p nativeElement only?
}
}
Run Code Online (Sandbox Code Playgroud)
我有这个输入:
<form #f="ngForm" name="productForm">
<md-input [(ngModel)]="product.price" name="price" required="true" placeholder="Price (USD)"></md-input>
<div ng-messages="productForm.price.$error" role="alert">
<div ng-message-exp="['required']">
Price is required
</div>
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
但是需要消息价格不会出现.
我该如何正确格式化错误消息?
当价格输入为空时,将显示ng-invalid类:
我想要的是类似于angular1 md设计的样式,如下所示:
我怎样才能在续集中做到这一点?
SELECT ProductID, Name, ListPrice, ListPrice * 1.15 AS NewPrice
FROM Production
Run Code Online (Sandbox Code Playgroud)
我试过了:
db.Production.findAndCountAll(
attributes: {
include: [
['ListPrice * 1.15', 'NewPrice']
]
}
).then(function(orders){
return res.jsonp(output);
})
Run Code Online (Sandbox Code Playgroud)
但它不起作用。
这是我期望的查询:
SELECT Production.ProductID, Production.Name, Production.ListPrice, Production.ListPrice * 1.15 AS NewPrice
FROM Production
Run Code Online (Sandbox Code Playgroud)
相反,我看到了这个查询:
SELECT Production.ProductID, Production.Name, Production.ListPrice, ListPrice * 1.15 AS NewPrice
FROM Production
Run Code Online (Sandbox Code Playgroud) 我有这个:
var arrA = [{id:1,name:'a'},{id:2,name:'b'},{id:3,name:'c'}];
Run Code Online (Sandbox Code Playgroud)
我有另一个数组:
var arrB = [{id:1,other:'c'},{id:3,other:'d'}];
Run Code Online (Sandbox Code Playgroud)
如何使用 underscore.js 从 arrA 中删除与 arrB 具有相同属性 ID 的项目?
预期的结果应该是:
arrA = [{id:2, name:'b'}];
Run Code Online (Sandbox Code Playgroud)
谢谢,
当我运行db:seed:all命令时,它给了我这个错误:
Seed file failed with error: Validation error
Run Code Online (Sandbox Code Playgroud)
如何查看Sequelize中哪个验证出错的日志?
这是我的模态代码:
let modal = Modal.create(DailyReportPage);
this.nav.present(modal);
Run Code Online (Sandbox Code Playgroud)
我遇到过cordova RemoteControl插件,为了监听它的事件,需要注册addEventListener.
//listen for the event
document.addEventListener("remote-event", function(event) {
//do something
});
Run Code Online (Sandbox Code Playgroud)
对我来说这是一个合适的方式吗?
我想在我的PC上安装Ubuntu OS上的Visual Studio 2008和MS SQL Server 2008,但是,我不知道如何.我可以请一些小贴士吗?谢谢.
我想将谷歌图表放入window.onload,但它没有显示任何内容,而在状态栏中显示"从www.google.com传输数据......"我知道我们是否将代码放在窗口外面. onload它肯定会工作,但我想放入window.onload.有什么建议?谢谢
这是我的代码

angular ×4
javascript ×4
node.js ×2
sequelize.js ×2
typescript ×2
charts ×1
installation ×1
ionic2 ×1
joomla ×1
mysql ×1
php ×1
sql-server ×1
ubuntu ×1