Value of component in IONIC 5 - ionic5

What is the equivalent code for this in IONIC 5?
JQM Code:
var EmployeeID = Apperyio('EMP_IDNo').val();
IONIC 5 Code: ???
let EmployID =
I haven't seen documentation regarding getting the using typescript in Ionic.

To read values of input components in Appery.io apps, based on Ionic 5 you just need to read variables, which are used in the property [(ngModel)] of that input components:
Define the variable
Select the input component and set the variable to its [(ngModel)] property
Use the TypeScript to read this variable (value of the input component)

Related

React JS element class names not rendering

Working on a pre existing React JS project and the className attribute does not render in the DOM what is defined.
For example - here is what code looks like in the project:
<div className={styles.intro_inner}></div>
Here is the output in the DOM:
I'm expecting the class name "intro_inner" to appear within the DOM.
Within JSX, the syntax attribute={variable} on a component means that the attribute will be set with the value of the given variable, not it's name. I would assume that your code has an object named styles which has an attribute named intro_inner whose value is some random mash of characters that you see output in the inspector.
If you want the class to be set as "intro_inner" then you need to set it as a string, not a variable. The syntax for that would be className="intro_inner".

How to enable italics on React component attributes in vim?

I am using iTerm2 with italics enabled, and I have the following in my vimrc:
Plugin 'pangloss/vim-javascript' "
Plugin 'mxw/vim-jsx' "
set background=dark
colorscheme one
let g:one_allow_italics = 1
hi htmlArg gui=italic
hi htmlArg cterm=italic
hi Comment gui=italic
hi Comment cterm=italic
hi Type gui=italic
hi Type cterm=italic
Standard html attributes and comments are currently rendering in italics, but React component attributes are not. Has anyone got this working?
Turns out I was using a theme that did not enable italics for React components, switching themes fixed my issue.

Runtime preview of selected html template

I am new in angular2.I am working with angular 2 and facing issue as follows
1]I have been designed 2-3 template like email template,sms template which will take predefined data and display that data
2]I have been designed screen which contains dropdown with name like email,sms etc
email option has link to email template and same for sms.
The main thing is i want to show the selected template view as a preview of that template.Means if i select sms then the sms template will be shown in given section of the same page.(like upload image preview.)
is it possible?
Thanks ..
Yes obviously, you have to use Routuing for the same, by using routing in angular2 you will be able to
navigate throughout the pages and you can show whatever page you want to display
see also :-
https://angular.io/docs/ts/latest/guide/router.html
latest Updated to angular2 RC1 (wroth reading)
https://coryrylan.com/blog/introduction-to-angular-2-routing
Angular 2 router examples + #Routes typing support
How to use child routes in Angular 2.

Render drupal form in custom template

I'm trying to render DRUPAL content type form in a custom tpl that I created. But its just printing the hidden fields not the actual form.
I tried using drupal_get_form and drupal_render, but nothing works!
Can someone suggest me a link or reference to drupal theming guide?
Am I missing something?
You need to use drupal_get_form and drupal_render on 2 different steps.
$myForm = drupal_get_form('YOUR_FORM_ID');
print drupal_render($myForm);

How to find components containing more than one specified class in Ext JS?

I am trying to find an example of an Ext JS component query which searches for items with more than one class.
This is the standard to find a component by class:
Ext.Component.query('panel[cls~=my-cls]')
I want to do something like:
Ext.Component.query('panel[cls~=my-cls && cls~=my-other-cls]')
Anyone have an example of this?
Thanks
btw, the component might have say 10 classes, but I only want to specify 2 it should contain e.g.
cls: 'ths tht r1 c1'
find components with both 'r1 & c1'
What version of Ext JS are you referring to? 4.1.2?
You should be able to chain atribute searches (tested in Ext JS 4.1.1, no ~= operator yet):
Ext.ComponentQuery.query("panel[cls~=my-cls][cls~=my-other-cls]")

Resources