javascript-framework

What is the exact meaning of export keyword in Angular 2\TypeScript?

和自甴很熟 提交于 2019-12-07 23:31:33
问题 I am pretty new in Angular 2 . I am studying how to create modules into an Angular app and I have the following doubt related a tutorial that I am following. My doubt is related to the routing. So in my example there is defined this AuthModule module: import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { SigninComponent } from './signin/signin.component'; import { SignupComponent } from './signup/signup.component'; import { AuthRoutingModule } from '

How to replace a component in ExtJS

混江龙づ霸主 提交于 2019-12-07 17:54:10
问题 I have an ExtJS window, with a toolbar at the top, and loads with plain Panel at the bottom with plain HTML. This works fine. On a button click, I'd like to be able to replace the bottom panel (called content), with another panel. If tried this var clickHandler = function(calendar){ // 'content' is the panel id // calendar is also an Ext.Panel object Ext.getCmp('content').update(calendar); }; What am I missing? 回答1: Update replaces HTML content. You want to remove the old panel and add the

How to create APK file of Sencha Touch Application?

余生颓废 提交于 2019-12-07 17:42:16
问题 I create Sencha Touch Application i wont create APK file of that Application i download sencha sdk tools and configure now what step need to follow to create APK file using sencha-sdk tool pl help me to create APK file using sencha-sdk tool 回答1: You can use Phonegap and eclipse to create native apk for andriod http://wiki.phonegap.com/w/page/30862722/phonegap-android-eclipse-quickstart 回答2: You can also create the apk without sencha sdk tools as follows Follow the steps 1.- Sign up in https:/

Is it possible to use Aurelia in a non-spa application?

荒凉一梦 提交于 2019-12-07 07:11:39
问题 Recently I've been playing around with different frameworks and libraries, looking for something that really suits my needs. You see, my job mainly involves creating asp.net mvc applications and for most of them using Razor and a little bit of jQuery is enough. But in certain cases and only for a few pages,which are rarely more than one or two per app, I really need something extra that helps me avoid getting entangled in a bunch of jQuery code. As I mentioned, I tried a couple of

Phonegap Error - “Cannot read property 'capture' of undefined” on Android

一曲冷凌霜 提交于 2019-12-07 05:52:04
问题 Trying to create a starter app with PhoneGap. I'm stuck on this line: navigator.device.capture.captureAudio(onSuccess, onError, {limits:1, duration:5}); It works fine on iOS but throws this error on Android emulator: Cannot read property 'capture' of undefined Here's navigator object, at the time of error (notice there's no device property which is causing this error) { "language": "en-US", "product": "Gecko", "mimeTypes": { "length": 0 }, "appVersion": "5.0 (Linux; U; Android 4.0.3; en-us;

Extjs grid column header, add dropdown menu item to specific columns

回眸只為那壹抹淺笑 提交于 2019-12-07 04:20:46
问题 I'm trying to add a button to the column header drop-down menus in my grid. However, I only want to add it to columns with certain itemId. So far I've got it working to add the button to all columns, see code below. I dont see where I could check each column's itemId though, it doesn't seem to iterate through the columns. Is there any workaround for this? Thank you! items:[{ region:'center', xtype:'grid', columns:{ items: COLUMNS, //defined in index.php }, store:'Items', selType:

PMT function Payment Type

陌路散爱 提交于 2019-12-06 21:50:40
Below is my function to calculate loan payment, As like in Excel I need to add another parameter which is payment type. function PMT (ir, np, pv, fv ) { /* ir - interest rate per month np - number of periods (months) pv - present value fv - future value (residual value) type - 0 or 1 need to implement that */ pmt = ( ir * ( pv * Math.pow ( (ir+1), np ) + fv ) ) / ( ( ir + 1 ) * ( Math.pow ( (ir+1), np) -1 ) ); return pmt; } With Type=0, the interest is computed for 1 month because the payment is assumed to be at the end of the month. For Type=1, the interest is computed for 0 months because

How to avoid javascript namespace conflict?

喜你入骨 提交于 2019-12-06 12:53:52
I have an enterprise app that imports some java script library (let's say A) with some functions in global namespace. Our customers can extend our platform and import jquery and that will result in namespace collision. What is best way for me to help customers not to hit namespace conflict since jquery is quite popular and every customer will be using it. How can I change namespace of library A ? What is the most convenient and safest way to do that. For jQuery, the easiest thing is to use jQuery.noConflict() to get a new selector variable instead of $. var j$ = jQuery.noConflict(); j$('#test

How to override navigator.plugins in javascript or how to set it null?

前提是你 提交于 2019-12-06 06:48:38
问题 navigator.plugins in javascript provides the plugins-array for the browser. Is it possible to set this array to null? I tried that( navigator.plugins = null; ) but it was not setting to null. Also, I tried to set it to an empty array( navigator.plugins = new Array(); ) Also if this is possible, is this a good practice? 回答1: In Chrome, it is possible to do this by setting window.navigator to null. However, I'm not sure why you would do this. Since you're dealing with JavaScript, it would be

mootools: I want to implement architecture similar to Big pipe in Facebook

随声附和 提交于 2019-12-06 06:38:12
问题 I am developing an application in mootools. I have used Reqeust class to implement pipelining it. I want to develop a superior method to handle client server requests. I referred the following article to understand how big pipe works in facebook. http://www.facebook.com/notes/facebook-engineering/bigpipe-pipelining-web-pages-for-high-performance/389414033919 In facebook, a javascript function is called on arrival of any server response to update data user screen. (see the screenshot) http:/