-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
AngularJS Directives Cookbook
By :
In this first example we will create a directive using inline templates rendered by the JavaScript inside of the directive. Also, in the example we will simulate the $http.get() method to get the closest example of a real situation.
In addition, we will see an important tip for loading videos from external sources using our application on a local server.
We are still using the Yeoman generator-angm (version 0.2.6) to build the base line application. You can get the code in the examples folder at PacktPub, or open your terminal window and type:
yo angm
Name it dynamic-templates and press Enter, Enter, and Enter..
The generator-angm (version 0.2.6) uses the new stable version from AngularJS, 1.4.5. For this chapter, it is very important to use the same version because on the next release, the generator will have some major changes and will use a different approach to build AngularJS modular applications.
Before we start to code...
Change the font size
Change margin width
Change background colour