16.07.2017 Views

AngularJS Essentials

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 2<br />

<br />

<br />

<br />

Plate<br />

Color<br />

Entrance<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

The parking lot is empty<br />

<br />

Depending on the implementation, you can use the complementary ngHide<br />

directive of ngShow.<br />

The ngIf directive<br />

The nglf directive could be used in the same way as the ngShow directive; however,<br />

while the ngShow directive just deals with the visibility of the element, the ngIf<br />

directive prevents the rendering of an element in our template.<br />

The ngInclude directive<br />

<strong>AngularJS</strong> provides a way to include other external HTML fragments in our pages.<br />

The ngInclude directive allows the fragmentation and reuse of the application<br />

layout and is an important concept to explore.<br />

The following is an example code for the usage of the ngInclude directive:<br />

<br />

[ 31 ]<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!