Tips for the life
Tuesday, April 19, 2016
Ionic get html element attribute value
Below is the way to get the html attributes value at controller.
In html :-
<div id="screenSize" nbsp="" width="100%"> ... </div>
In controller js : -
var scrPro = document.getElementById('screenSize');
console.log('width 2 = ' + scrPro);
console.log('test = ' + scrPro.attributes['width'].value);
Newer Posts
Older Posts
Home
Subscribe to:
Comments (Atom)