![]() ![]() All own enumerable properties of that object will be made available on the controller prototype, with the exception of the targets property, which will be available on the controller constructor itself, i.e. This helper is called Stacks.addController and takes two arguments: The name (“identifier”) of the controller, and an object that is analogous to the ES6 class that you would write for your controller, except that it's a plain JavaScript object. In order to make it useful without ES6-to-ES5 transpilation, Stacks provides a helper that allows you to write controllers using old-fashioned JavaScript syntax. That documentation generally assumes that you’re writing ES6 code. This means you can not only use Stacks-provided controllers, but also create your own.įor general information about writing code with Stimulus, refer to the official documentation. See Using Stacks for more information on Unpkg and installing Stacks via NPM.Ĭreating your own Stimulus controllers Section titled Creating your own Stimulus controllersĪ side effect of including the Stacks JavaScript in your project is that you also have Stimulus available in your page. For example, if you use the unpkg CDN, add the tag to your HTML. Include the file dist/js/ in your page.To include Stacks JavaScript in other projects, do the following. Pues eso ya se ha terminado gracias a la aplicación Unpkg. If you’re working on a Stack Overflow project, chances are it’s already available for you! If not, reach out to us and we’ll work on getting it setup. Este combina perfectamente con empaquetadores de mdulos, tales como Webpack o Browserify. NPM es el mtodo de instalacin recomendado para construir aplicaciones a gran escala con Vue. ![]() Stacks JavaScript is currently included within various Stack Overflow projects automatically. Esta es una versin ms pequea optimizada para la velocidad en lugar de la experiencia de desarrollo. The converse is not true: The JavaScript components work under the assumption that the Stacks CSS is available. If you only need the styling parts of Stack, you’re free to ignore the provided JavaScript. While Stacks is first and foremost a CSS library, it also provides commonly used functionality for some components via JavaScript. Including the Stacks JavaScript Section titled Including the Stacks JavaScript ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |