http://kimagureneet.hatenablog.com/entry/2015/01/19/050000
I am referring to the above page.
ng-style="{width:'400px'}"
How should I write this '400px' as a variable?
javascript angularjs
If you register properties with $scope
in the controller, you can configure them with {{property name}}
.
JavaScript
$scope.widthValue="'400px'";
HTML
<div ng-style="{width:{{widthValue}}}">
541 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
520 Uncaught (inpromise) Error on Electron: An object could not be cloned
546 Who developed the "avformat-59.dll" that comes with FFmpeg?
676 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.