Book Image

Learning Aurelia

By : Manuel Guilbault
Book Image

Learning Aurelia

By: Manuel Guilbault

Overview of this book

<p>Aurelia is one of the most promising new JavaScript frameworks for mobile, desktop, and web, which makes developing powerful, modern web applications a straightforward task. Its power lies in its simplicity and clear workflow that enables developers to build next-generations apps for the web with ease.</p> <p>From initial structuring to full deployment, this book will serve as a step-by-step guide to develop a modern web application from scratch with the Aurelia framework. In addition to including a comprehensive coverage of various Aurelia framework features, this book will also show you how to utilize these features in the real world to develop a professional single-page web application. You’ll see how to make the most out of Aurelia by understanding the Aurelia workflow and then applying it in real-world development tasks. By the end of the book, you will have learned to develop a clean and maintainable application in Aurelia from scratch.</p>
Table of Contents (20 chapters)
Learning Aurelia
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Adding libraries


Adding a library using JSPM is only a matter of running the proper command:

> jspm install aurelia-validation

This command will install the aurelia-validation library to the project. Since JSPM has been designed to work with SystemJS, it will also add the proper entries to the SystemJS mapping configuration, which is found in the config.js file and is used by SystemJS to map module names to URLs or local paths.

Once this command completes, the SystemJS module loader will be able to locate aurelia-validation and its dependencies, if any, so you can start using it right away in your application.

Using a library in a JSPM-based application is similar to a CLI-based project. If you need to use some of the library's JS exports, simply import them in a JS file:

import {ValidationController} from 'aurelia-validation'; 

If you want to import other resources, like CSS files, simply require it in the proper template:

<require from="bootstrap/css/bootstrap.css"></require>