我是个新手,刚接触Titanium、Web编程和移动应用程序。我想做一个简单的事件监听器。当我单击该图像时,将打开另一个窗口。其他窗口必须是外部.js文件
var image=Ti.UI.createImageWiew({
image:'...............',
})
image.addeventListener('click',function(){
//what do I write here?
)
当我调整窗口大小的时候。下面的事件不是检测窗口大小,而是每次我得到的错误。
@HostListener('window:resize', ['$event'])
onResize(event) {
this.innerWidth = window.innerWidth;
}
错误:
GuidanceReportComponent_Host.ngfactory.js? [sm]:1 ERROR TypeError: jit_nodeValue_2(...).grElementList is not a function
at Object.
在我的Node.js代码中,我在Linux上运行时会收到以下错误,但在我的窗口机器上没有。我不会在这两者之间改变文件结构。为什么会发生这种事?
Error: Cannot find module './app/helpers/textHelper.js'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (i
我试着做一个小应用程序,当我启动我的应用程序时,我在创建窗口时遇到了一些小问题。
在开始时,我有一个具有固定位置和大小的页面,这就是我在background.js文件中所做的事情(我在这个文件中没有其他内容):
chrome.app.runtime.onLaunched.addListener(function() {
var screenWidth = screen.availWidth;
var screenHeight = screen.availHeight;
var width = 700;
var height = 650;
var left = Ma