require(['jquery', 'px-libs/jquery.autosize'], function($) {
...
});
To use autosize plugin, you need to include the next scripts:
<script src="path/to/js/libs/jquery.autosize.js"></script>
<script src="path/to/js/pixeladmin/directives/angular-autosize.js"></script>
Then inject the plugin into your angular application:
angular.module('yourApp', ['angular-autosize']);
Alternatively, you can include autosize plugin using ocLazyLoad plugin:
$ocLazyLoad.load([
{
name: 'angular-autosize',
files: [
'path/to/js/libs/jquery.autosize.js',
'path/to/js/pixeladmin/directives/angular-autosize.js',
],
},
]);
autosize
directive
You can use autosize
directive on textarea elements.
And when the scope is destroyed the directive will be destroyed.