100% found this document useful (2 votes)
269 views

Angular 2 ui development Kasagoni download pdf

Angular

Uploaded by

wittypayorkr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
269 views

Angular 2 ui development Kasagoni download pdf

Angular

Uploaded by

wittypayorkr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Angular 2 ui development Kasagoni

https://textbookfull.com/product/angular-2-ui-development-
kasagoni/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Next-Level UI Development with PrimeNG: Master the


versatile Angular component library to build stunning
Angular applications 1st Edition Dale Nguyen
https://textbookfull.com/product/next-level-ui-development-with-
primeng-master-the-versatile-angular-component-library-to-build-
stunning-angular-applications-1st-edition-dale-nguyen/
textboxfull.com

Angular 2 Cookbook Frisbie

https://textbookfull.com/product/angular-2-cookbook-frisbie/

textboxfull.com

Angular Development with Typescript Second Edition Yakov


Fain

https://textbookfull.com/product/angular-development-with-typescript-
second-edition-yakov-fain/

textboxfull.com

UI Design for iOS App Development: Using SwiftUI Bear


Cahill

https://textbookfull.com/product/ui-design-for-ios-app-development-
using-swiftui-bear-cahill/

textboxfull.com
Ang-book 2: The Complete Book on Angular 2 1st Edition
Nate Murray

https://textbookfull.com/product/ang-book-2-the-complete-book-on-
angular-2-1st-edition-nate-murray/

textboxfull.com

Mobile app development with Ionic cross platform apps with


Ionic Angular and Cordova Griffith

https://textbookfull.com/product/mobile-app-development-with-ionic-
cross-platform-apps-with-ionic-angular-and-cordova-griffith/

textboxfull.com

Angular Up and Running Learning Angular Step by Step Shyam


Seshadri

https://textbookfull.com/product/angular-up-and-running-learning-
angular-step-by-step-shyam-seshadri/

textboxfull.com

Learn With Angular 4 Collected Essays Angular CLI Unit


Testing Debugging TypeScript and Angular Build Processes
2nd Edition Jeffry Houser
https://textbookfull.com/product/learn-with-angular-4-collected-
essays-angular-cli-unit-testing-debugging-typescript-and-angular-
build-processes-2nd-edition-jeffry-houser/
textboxfull.com

Practical UI 2nd Edition Adham Dannaway

https://textbookfull.com/product/practical-ui-2nd-edition-adham-
dannaway/

textboxfull.com
www.ebook3000.com
Building Modern Web
Applications Using Angular

Learn how to create rich and compelling web applications


with Angular

Shravan Kumar Kasagoni

BIRMINGHAM - MUMBAI
Building Modern Web Applications Using
Angular
Copyright © 2017 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

First published: May 2017

Production reference: 1240517


Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78588-072-8
www.packtpub.com

www.ebook3000.com
Credits

Author Copy Editors


Shravan Kumar Kasagoni Safis Editing
Dipti Mankame

Reviewers Project Coordinator


Hemant Singh Judie Jose
Phodal Huang

Acquisition Editors Proofreader


Tushar Gupta Safis Editing

Content Development Editor Indexer


Juliana Nair Rekha Nair

Technical Editor Graphics


Mohd Riyan Khan Kirk D'Penha

Production Coordinator
Melwyn Dsa
About the Author
Shravan Kumar Kasagoni is a developer, gadget freak, technology evangelist, mentor,
blogger, and speaker living in Hyderabad. He has been passionate about computers and
technology right from childhood. He holds a bachelors degree in computer science and
engineering, and he is a Microsoft Certified Professional.

His expertise includes modern web technologies (HTML5, JavaScript, and Node.js) and
frameworks (Angular, React.js, Knockout.js, and so on). He has also worked on many
Microsoft technologies, such as ASP.NET MVC, ASP.NET WEB API, WCF, C#, SSRS, and
the Microsoft cloud platform Azure.

He is a core member of Microsoft User Group Hyderabad, where he helps thousands of


developers on modern web technologies and Microsoft technologies. He also actively
contributes to open source community. He is a regular speaker at local user groups and
conferences. Shravan has been awarded Microsoft's prestigious Most Valuable Professional
award for past 6 years in a row for his expertise and community contributions in modern
web technologies using ASP.NET and open source technologies.

He is currently working with Novartis India, where he is responsible for the design and
development of high-performance modern enterprise web applications and RESTful APIs.
Previously, he was associated with Thomson Reuters and Pramati Technologies.

I would like to thank my wife for putting up with my late-night writing sessions, my
parents, and brother for their constant support. I also give deep thanks and express
gratitude to my close friends, Pranav and Ashwini Reddy, who have always been there to
encourage, guide, and help me.
I would also like to thank my former colleagues Monisha and Dharmendra, and my friends,
Abhijit Jana, Sudhakar, Subhendu, Sai Kiran, Srikar Ananthula, and Raghu Ram. I am
thankful to my mentors, Nagaraju Bende and Mallikarjun, without whom I may not have
got here.

www.ebook3000.com
About the Reviewers
Hemant Singh is a developer living in Hyderabad/AP, India. Currently, he is working for
Microsoft as a UX consultant. He loves open source, and is active in various projects.
Hemant is not much of a blogger, but tries to share information whenever possible.

He handcrafts CSS and HTML documents and handles JavaScript (the good parts). It won’t
be surprising if he tells you that he fell in love with HTML5 and, of course, CSS3. Hemant
also has a passion for user interface and experience design and tries to show some of his
work in his portfolio.

Phodal Huang is a developer, creator, and author. He works for ThoughtWorks as a


consultant. Currently, he focuses on IoT and frontend development. He is the author of
Design Internet of Things and Growth: Thinking in Full Stack in Chinese .

He is an open source enthusiast, and has created a series of projects in GitHub. After his
daily work, he likes to reinvent some wheels for fun. He created the application Growth
with Ionic 2 and Angular 2 , which is about coaching newbies about programming. You can
find out more about wheels on his GitHub page, http://github.com/phodal.

He loves designing, writing, hacking, and traveling. You can also find out more about him
on his personal website at http://www.phodal.com.
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a
print book customer, you are entitled to a discount on the eBook copy. Get in touch with us
at service@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a
range of free newsletters and receive exclusive discounts and offers on Packt books and
eBooks.

https://www.packtpub.com/mapt

Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt
books and video courses, as well as industry-leading tools to help you plan your personal
development and advance your career.

Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser

www.ebook3000.com
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial
process. To help us improve, please leave us an honest review on this book's Amazon page
at https://www.amazon.com/dp/1785880721.

If you'd like to join our team of regular reviewers, you can e-mail us at
customerreviews@packtpub.com. We award our regular reviewers with free eBooks and
videos in exchange for their valuable feedback. Help us be relentless in improving our
products!
Table of Contents
Preface 1
Chapter 1: Getting Started 6
Introduction to Angular 6
What is new in Angular? 7
Setting up the environment 7
Installing Node.js and npm 8
Language choices 8
ECMAScript 5 9
ECMAScript 2015 9
TypeScript 9
Installing TypeScript 10
TypeScript basics – types 10
String 11
Number 11
Boolean 11
Array 11
Enum 11
Any 12
Void 12
Functions 13
Function declaration – named function 14
Function expression – anonymous function 14
Classes 14
Writing your first Angular application 16
Set up the Angular application 16
Step 1 16
Step 2 18
Step 4 19
Step 5 20
Step 6 21
Step 7 22
Step 8 22
SystemJS 23
Using the Angular component 24
Understanding npm packages 25
Step 9 26
Step 10 26
Using Angular CLI 28

www.ebook3000.com
Getting started with Angular CLI 28
Summary 29
Chapter 2: Basics of Components 31
Getting started 31
Project setup 31
Working with data 34
Displaying data 35
Interpolation syntax 35
Property binding 37
Attribute binding 38
Event binding 38
Two-way data binding 41
Built-in directives 42
Structural directives 42
ngIf 43
ngFor 43
Understanding ngFor syntax 43
ngSwitch 44
Attribute directives 45
ngStyle 45
ngClass 46
Building the master-detail component 47
Summary 53
Chapter 3: Components, Services, and Dependency Injection 54
Introduction 54
Working with multiple components 55
Input properties 57
Aliasing input properties 58
Output properties 59
Aliasing output properties 61
Sharing data using services 63
Dependency injection 67
Using a class provider 67
Using a class provider with dependencies 68
Using alternate class providers 69
Using aliased class providers 70
Summary 71
Chapter 4: Working with Observables 72
Basics of RxJS and Observables 72
Reactive programming 72

[ ii ]
Observer 73
Observable 74
Subscription 76
Operators 76
Observables in Angular 77
Observable stream and mapping values 77
Merging Observable streams 78
Using the Observable.interval() method 79
Using AsyncPipe 81
Building a Books Search component 82
Summary 90
Chapter 5: Handling Forms 91
Why are forms hard? 91
Angular forms API 91
FormControl, FormGroup, and FormArray 92
FormControl 92
Creating a form control 92
Accessing the value of an input control 93
Setting the value of input control 93
Resetting the value of an input control 93
Input control states 93
FormGroup 94
FormArray 95
Template driven forms 96
Creating a registration form 96
Using the ngModel directive 99
Accessing an input control value using ngModel 100
Using ngModel to bind a string value 101
Using ngModel to bind a component property 102
Using the ngForm directive 105
Submitting a form using the ngSubmit method 106
Using the ngModelGroup directive 110
Adding validations to the registration form 112
Pros and cons of template driven forms 116
Reactive forms 117
Creating a registration form using reactive forms 117
Using FormGroup, FormControl, and Validators 118
Using [formGroup], formControlName, and formGroupName 119
Using FormBuilder 121
CustomValidators 122
Pros and cons of reactive forms 125
Summary 125

[ iii ]

www.ebook3000.com
Chapter 6: Building a Book Store Application 126
Book Store application 126
HTTP 126
Making GET requests 131
Routing 137
Defining routes 137
RouterOutlet Directive 139
Named RouterOutlet 142
Navigation 142
Route params 142
Animating routed components 148
Feature modules using @NgModule() 150
Summary 153
Chapter 7: Testing 154
Testing 154
Unit testing 155
End-to-end testing 155
Tooling 155
Configuration files 155
Jasmine basics 156
Unit testing 157
Isolated unit tests 157
Writing basic isolated unit tests 159
Testing services 161
Mocking dependencies 162
Testing components 164
Integrated unit tests 165
Testing components 165
Testing components with dependencies 169
Summary 172
Chapter 8: Angular Material 173
Introduction 173
Getting started 173
Project setup 174
Using Angular Material components 176
Master-detail page 176
Books list page 183
Add book dialog 189
User registration form 193

[ iv ]
Adding themes 197
Summary 199
Index 200

[v]

www.ebook3000.com
Preface
Building Modern Web Applications Using Angular helps readers to design and develop
modern web applications. It provides a solid understanding of the Angular 4 framework.
Readers will learn how to build and architect high-performance web applications mainly
focusing on UI. This is an end-to-end guide for all the new features in Angular 4. This book
also covers some of the latest JavaScript concepts in ECMAScript 2015, ECMAScript 2016,
and TypeScript.

This book will take you from nowhere when it comes to building UI applications for Web
and mobile to become a master using Angular 4. It will explain almost every feature of the
Angular 4 framework with a particle approach and lots of examples, showing how to use
them in real-world scenarios to build compelling UI applications. Chapters at the end of the
book are dedicated to show how to build an end-to-end application UI using individual
Angular 4 features that were explained in previous chapters.

What this book covers


Chapter 1, Getting Started, introduces the Angular 4 framework and its new features, how
Angular 4 is better and more powerful than its predecessor Angular 1, development
environment setup for Angular 4 applications. Also, it provides a quick insight
into TypeScript and its features, how to write a basic Angular 4 app, and understanding its
anatomy.

Chapter 2, Basics of Components, walks through the basics of Angular 4 components,


starting with display data using interpolation syntax, property binding, attribute binding,
working with DOM events, and two-way data binding. It also introduces structural
directives for conditionally displaying data and attribute directives for conditional styling.

Chapter 3, Components, Services, and Dependency Injection, walks through how to develop
Angular 4 applications using multiple components, communicating between components,
sharing the data between these components using services and injecting services using
dependency injection, as well as how dependency injection works.

Chapter 4, Working with Observables, focuses on reactive programming, Observables, RxJS,


how Angular 4 implements Observables using RxJS, and using Observables and RxJS
operators in Angular 4 applications.
Preface

Chapter 5, Handling Forms, introduces how to create different types of forms in Angular 4
applications to accept user input and validate it using template-driven forms, reactive
forms, and validation directives.

Chapter 6, Building a Book Store Application, walks through how to structure tiny to a
complex application using Angular 4 modules, build various types of user interfaces in a
Book Store application, navigate between components using routing, interact with the
server using the HTTP service.

Chapter 7, Testing, introduces how to write unit tests using Jasmine and Angular Test
Utilities for various parts of Angular 4 applications.

Chapter 8, Angular Material, walks through how to build a single compelling UI, which
flows across desktops, tablets, and mobile devices, using material design, and learning how
to customize material design as per customer branding.

What you need for this book


This book assumes a basic knowledge of JavaScript, web development, how to use
command line, Git, and node package manager (npm).

In this book, you will need the following software list:

Operating system:
MAC OS X 10.9 and higher
WINDOWS 7 and higher
Node.js 6:
MAC: https://nodejs.org/dist/v6.10.3/node-v6.10.3.pkg
Windows: https://nodejs.org/dist/v6.10.3/node-v6.10.3-x
64.msi
Any code editor
Visual Studio Code
Sublime

Internet connectivity is required to install the necessary npm packages.

[2]

www.ebook3000.com
Preface

Who this book is for


This book is for developers building web applications who are new to the Angular world
and interested in creating modern, responsive, complex UI applications using Angular 4.
For developers who are already working with the AngularJS 1 framework, this book
provides an upgrading path with new concepts.

Conventions
In this book, you will find a number of text styles that distinguish between different kinds
of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, folder names, filenames, file extensions, path names, URLs, user input,
and Twitter handles are shown as follows:

A block of code is set as follows:


import { Component } from '@angular/core';

@Component({
selector: 'hello-world-app',
template: '<h1>Say Hello to Angular</h1>'
})
class HelloWorldAppComponent { }

Any command-line input or output is written as follows:


$ npm install json-server -save

New terms and important words are shown in bold. Words that you see on the screen, for
example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button
moves you to the next screen."

Warnings or important notes appear in a box like this.

Tips and tricks appear like this.

[3]
Preface

Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book-what you liked or disliked. Reader feedback is important for us as it helps us develop
titles that you will really get the most out of.

To send us general feedback, simply e-mail feedback@packtpub.com, and mention the


book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help you
to get the most from your purchase.

Downloading the example code


You can download the example code files for this book from your account at
http://www.packtpub.com. If you purchased this book elsewhere, you can visit
http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

1. Log in or register to our website using your e-mail address and password.
2. Hover the mouse pointer on the SUPPORT tab at the top.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box.
5. Select the book for which you're looking to download the code files.
6. Choose from the drop-down menu where you purchased this book from.
7. Click on Code Download.

Once the file is downloaded, please make sure that you unzip or extract the folder using the
latest version of:

WinRAR / 7-Zip for Windows


Zipeg / iZip / UnRarX for Mac
7-Zip / PeaZip for Linux

[4]

www.ebook3000.com
Preface

The complete set of code can also be downloaded from the following GitHub repository: ht
tps://github.com/PacktPublishing/Building-Modern-Web-Application-using-Angul
ar. We also have other code bundles from our rich catalog of books and videos available at:
https://github.com/PacktPublishing/. Check them out!

Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-
we would be grateful if you could report this to us. By doing so, you can save other readers
from frustration and help us improve subsequent versions of this book. If you find any
errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting
your book, clicking on the Errata Submission Form link, and entering the details of your
errata. Once your errata are verified, your submission will be accepted and the errata will
be uploaded to our website or added to any list of existing errata under the Errata section of
that title.

To view the previously submitted errata, go to


https://www.packtpub.com/books/content/support and enter the name of the book in the
search field. The required information will appear under the Errata section.

Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At
Packt, we take the protection of our copyright and licenses very seriously. If you come
across any illegal copies of our works in any form on the Internet, please provide us with
the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated


material.

We appreciate your help in protecting our authors and our ability to bring you valuable
content.

Questions
If you have a problem with any aspect of this book, you can contact us at
questions@packtpub.com, and we will do our best to address the problem.

[5]
Getting Started
1
In this chapter, we are going to learn the Angular framework basics and new features. We
will learn how to use features from future versions of JavaScript and TypeScript to develop
modern web applications using Angular. After going through this chapter, the reader will
understand the following concepts:

The Angular framework and its new features


Setting up the environment for development
The basics of TypeScript
Angular application basics
How to write your first Angular application?

Introduction to Angular
What is Angular? It is an open source modern JavaScript framework in order to build the
Web, mobile web, native mobile, and native desktop applications. It can also be used in
combination with any server-side web application framework, such as ASP.NET and
Node.js. Angular is the successor of AngularJS 1, which is one of the best JavaScript
frameworks for building client-slide web applications, used by millions of developers
across the globe.

Even though the developer community highly appreciates AngularJS 1, it has its challenges.
Many developers feel that the AngularJS 1 learning curve is high. Out-of-the-box
performance in complex applications with a huge amount of data is not that great, which is
essential in enterprise applications. The API to build directives is very confusing and
complex, even for an experienced AngularJS 1 programmer, which is the key concept to
build UI applications based component-based architecture.

www.ebook3000.com
Getting Started

Angular is the next version of AngularJS 1.x, but it is a complete rewrite from its
predecessor. It is built on top of the latest web standards (web components, Observables,
and decorators), the learning curve is minimal, and performance is better. This book will
cover the latest version of Angular, which is version 4, at the time of writing this book.
Angular 4 is an incremental update from Angular 2, unlike Angular 2.

When we use the term Angular, we are referring to the latest version of
the framework. Anywhere we need to discuss version 1.x, we will use the
term AngularJS.

What is new in Angular?


Many concepts in version 1.x are irrelevant in Angular, such as controller, directive
definition object, jqLite, $scope, and $watch. Even though lots of concepts are irrelevant,
lots of goodness in AngularJS 1.x is carried forward to Angular such as services,
dependency injection, and pipes. Here is a list of the new features in Angular:

Components
New templating syntax
Unidirectional data flow
Ultra-fast change detection
New component router
Observables
Server-side rendering
New languages for development
ES2015
TypeScript
Ahead of time compilation

Setting up the environment


We can start developing our Angular applications without any setup. However, we are
going to use Node.js and npm (node package manager) for tooling purposes. We need
them for downloading tools, libraries, and packages. We also use them for build process
automation. Angular applications are as follows:

[7]
Getting Started

Node.js is a platform built on top of V8, Google's JavaScript runtime, which also
powers the Chrome browser
Node.js is used for developing server-side JavaScript applications
The npm is a package manager for Node.js, which makes it quite simple to install
additional tools via packages; it comes bundled with Node.js

Installing Node.js and npm


The easiest way to install Node is to follow the instructions at: https://nodejs.org.
Download the latest version of Node for the respective operating system and install it. The
npm is installed as part of the Node.js installation.

Once we install Node.js, run the following commands on the command line in Windows or
Terminal in macOS to verify that Node.js and npm are installed and set up properly:
$ node -v
$ npm -v

The preceding commands will display currently installed Node.js and npm versions,
respectively:

The Angular documentation recommends installing at least Node.js v4.x.x,


NPM 3.x.x, or higher versions.

Language choices
We can write the Angular applications in JavaScript or any language that can be compiled
into JavaScript. Here, we are going to discuss the three primary language choices.

[8]

www.ebook3000.com
Getting Started

ECMAScript 5
ECMAScript 5 (ES5) is the version of JavaScript that runs in today's browsers. The code
written in ES5 does not require any additional transpilation or compilation, and there is no
new learning curve. We can use this as it is to develop Angular applications.

ECMAScript 2015
ECMAScript 2015 (ES2015), previously known as ECMAScript 6 (ES6), is the next version
of JavaScript. ES2015 is a significant update to the JavaScript language; the code written in
ES2015 is a lot cleaner than ES5. ES2015 includes a lot of new features to increase the
expressiveness of JavaScript code (for example, classes, arrows, and template strings).

However, today's browsers do not support all the features of ES2015 completely (for more
information please refer to: https://caniuse.com/#search=es6). We need to use
transpilers like Babel to transform ES2015 code into ES5-compatible code so that it works in
today's browsers.

Babel is a JavaScript transpiler, and it transpiles our code written in


ES2015 to ES5 that runs in our browsers (or on your server) today. Learn
more about Babel at https://babeljs.io.

TypeScript
TypeScript is a superset of JavaScript, which means all the code written in JavaScript is
valid TypeScript code, and TypeScript compiles back to simple standards-based JavaScript
code, which runs on any browser, for any host, on any OS. TypeScript lets us write
idiomatic JavaScript. It provides optional static types that are useful for building scalable
JavaScript applications and other features such as classes, modules, and decorators from
future versions of the JavaScript.

It provides the following features to improve developer productivity and build scalable
JavaScript applications:

Static checking
Symbol-based navigation
Statement completion
Code refactoring

[9]
Getting Started

These features are critical in large-scale JavaScript application developments, so in this


book, we are going to use TypeScript for writing Angular applications. The Angular
framework itself was developed in TypeScript.

All the ECMAScript 5 code is valid in ECMAScript 2015; all ECMAScript


2015 code is valid TypeScript code.

Installing TypeScript
We can install TypeScript in multiple ways, and we are going to use npm, which we
installed earlier. Go to the command line in Windows or Terminal in macOS and run the
following command:
$ npm install -g typescript

The preceding command will install the TypeScript compiler and makes it available
globally.

TypeScript basics – types


TypeScript uses .ts as a file extension. We can compile TypeScript code into JavaScript by
invoking the TypeScript compiler using the following command:
$ tsc <filename.ts>

JavaScript is a loosely typed language, and we do not need to declare the type of a variable
ahead of time. The type will be determined automatically while the program is being
executed. Because of the dynamic nature of JavaScript, it does not guarantee any type
safety. TypeScript provides an optional type system to ensure type safety.

[ 10 ]

www.ebook3000.com
Getting Started

In this section, we are going learn the important data types in TypeScript.

String
In TypeScript, we can use either double quotes (") or single quotes (') to surround strings
similar to JavaScript.
var bookName: string = "Angular";
bookName = 'Angular UI Development';

Number
As in JavaScript, all numbers in TypeScript are floating point values:
var version: number = 4;

Boolean
The boolean data type represents the true/false value:
var isCompleted: boolean = false;

Array
We have two different syntaxes to describe arrays, and the first syntax uses the element
type followed by []:
var fw: string[] = ['Angular', 'React', 'Ember'];

The second syntax uses a generic array type, Array<elementType>:


var fw: Array<string> = ['Angular', 'React', 'Ember'];

Enum
TypeScript includes the enum data type along with the standard set of data types from
JavaScript. In languages such as C# and JAVA, an enum is a way of giving more friendly
names to sets of numeric values, as shown in the following code snippet:
enum Frameworks { Angular, React, Ember };
var f: Frameworks = Frameworks.Angular;

[ 11 ]
Getting Started

The numbering of members in the enum type starts with 0 by default. We can change this
by manually setting the value of one of its members. As illustrated earlier, in code snippet,
the Frameworks.Angular value is 0, the Frameworks.React value is 1, and the
Frameworks.Ember value is 2.

We can change the starting value of enum type to 5 instead of 0, and remaining members
follow the starting value:
enum Frameworks { Angular = 5, React, Ember };
var f: Frameworks = Frameworks.Angular;
var r: Frameworks = Frameworks.React;

In the preceding code snippet, the Frameworks.Angular value is 5, the


Frameworks.React value is 6, and the Frameworks.Ember value is 7.

Any
If we need to opt out type-checking in TypeScript to store any value in a variable whose
type is not known right away, we can use any keyword to declare that variable:
var eventId: any = 7890;
eventId = 'event1';

In the preceding code snippet while declaring a variable, we are initializing it with the
number value, but later we are assigning the string value to the same variable. TypeScript
compiler will not report any errors because of any keyword. Here is one more example of
an array storing different data type values:
var myCollection:any[] = ["value1", 100, 'test', true];
myCollection[2] = false;

Void
The void keyword represents not having any data type. Functions without return
keyword do not return any value, and we use void to represent it.
function simpleMessage(): void {
alert("Hey! I return void");
}

[ 12 ]

www.ebook3000.com
Getting Started

Let's write our first TypeScript example and save it into the example1.ts file:
var bookName: string = 'Angular UI Development';
var version: number = 2;
var isCompleted: boolean = false;
var frameworks1: string[] = ['Angular', 'React', 'Ember'];
var frameworks2: Array<string> = ['Angular', 'React', 'Ember'];
enum Framework { Angular, React, Ember };
var f: Framework = Framework.Angular;
var eventId: any = 7890;
eventId = 'event1';
var myCollection:any[] = ['value1', 100, 'test', true];
myCollection[2] = false;

Let's compile the example1.ts file using the TypeScript command-line compiler:
$ tsc example1.ts

The preceding command will compile TypeScript code into plain JavaScript code into the
example1.js file; this is how it will look, and it is plain JavaScript:

var bookName = 'Angular UI Development';


var version = 2;
var isCompleted = false;
var frameworks1 = ['Angular', 'React', 'Ember'];
var frameworks2 = ['Angular', 'React', 'Ember'];
var Framework;
(function (Framework) {
Framework[Framework["Angular"] = 0] = "Angular";
Framework[Framework["React"] = 1] = "React";
Framework[Framework["Ember"] = 2] = "Ember";
})(Framework || (Framework = {}));
;
var f = Framework.Angular;
var eventId = 7890;
eventId = 'event1';
var myCollection = ['value1', 100, 'test', true];
myCollection[2] = false;

Functions
Functions are the fundamental building blocks of any JavaScript application. In JavaScript,
we declare functions in two ways.

[ 13 ]
Getting Started

Function declaration – named function


The following is an example of function declaration:
function sum(a, b) {
return a + b;
}

Function expression – anonymous function


The following is an example of function expression:
var result = function(a, b) {
return a + b;
}

In JavaScript, unlike any other concept, there is no type safety for functions also. We do not
have any assurance on data types of parameters, return type, the number of parameters
passed to function, TypeScript guarantees all this. It supports both the syntaxes.

Here are the same functions written in TypeScript:


function sum(a: number, b: number): number {
return a + b;
}

var result = function(a: number, b: number): number {


return a + b;
}

The preceding TypeScript functions are very similar to the JavaScript syntax except
parameters, and return type has type on them, which ensures type safety while invoking
them.

Classes
The ES5 does not have the concept of classes. However, we can mimic the class structure
using different JavaScript patterns. The ES2015 does support classes. However, today, we
can already write them in TypeScript. In fact, the ECMAScript 2015 class syntax is inspired
by TypeScript.

[ 14 ]

www.ebook3000.com
Getting Started

The following example shows a person class written in TypeScript:


class Person {
name: string;
constructor(name: string) {
this.name = name;
}
sayHello() {
return 'Hello ' + this.name;
}
}

var person = new Person('Shravan');


console.log(person.name);
console.log(person.sayHello());

The preceding Person class has three members - a property named name, a constructor,
and a method sayHello. We should use this keyword to refer to the properties of the class.
We created an instance of the Person class using the new operator. In the next step, we
invoke the sayHello() method of the Person class using its instance created in the
previous step.

Save the preceding code into the person.ts file and compile it using the TypeScript
command-line compiler. It will compile TypeScript code into plain JavaScript code into the
person.js file:

$ tsc person.ts

Here is the plain JavaScript code, which was compiled from the TypeScript class:
var Person = (function () {
function Person(name) {
this.name = name;
}
Person.prototype.sayHello = function () {
return 'Hello ' + this.name;
};
return Person;
}());

var person = new Person('Shravan');


console.log(person.name);
console.log(person.sayHello());

[ 15 ]
Getting Started

To learn more about functions, classes, and other concepts in TypeScript,


check out http://typescriptlang.org.

Writing your first Angular application


Angular follows a component-based approach to building an application. An application
written in AngularJS 1 is a set of individual controllers and views, but in Angular, we need
to treat our application as a component tree.

The Angular application component tree will have one root component; it will act as
the entry point of the application. All the other components that are part of the application
will load inside the root component, and they can be nested in any way that we need inside
the root component.

Angular also has the concept of modules, which are used for grouping components with
similar functionality. An Angular application should have minimum one module and
minimum one component that should be part of that module. Component acts as root
component, and module acts as root module.

Set up the Angular application


Let' us begin writing our first Angular application by creating the following folder structure
and files:
hello-world
├─ index.html
├─ package.json
├─ tsconfig.json
└─ src
└─ app.ts

Step 1
As we are going to write our application in TypeScript, let us begin with the
tsconfig.json file first. It is the TypeScript configuration file that contains instructions for
its compiler on how to compile TypeScript code into JavaScript. If we do not use the
tsconfig.json file, the TypeScript compiler uses the default flags during compilation, or
we can pass our flags manually every time while compiling.

[ 16 ]

www.ebook3000.com
Exploring the Variety of Random
Documents with Different Content
be concluded from their doctrine. And by a happy utterance of
divination, not without divine help, concurring in certain prophetic
declarations, and seizing the truth in portions and aspects, in terms
not obscure, and not going beyond the explanation of the things,
they honoured it on ascertaining the appearance of relation with the
truth. Whence the Hellenic philosophy is like the torch of wick which
men kindle, artificially stealing the light from the sun. But on the
proclamation of the Word all that holy light shone forth. Then in
houses by night the stolen light is useful; but by day the fire blazes,
and all the night is illuminated by such a sun of intellectual light.
Now Pythagoras made an epitome of the statements on
righteousness in Moses, when he said, “Do not step over the
balance;” that is, do not transgress equality in distribution,
honouring justice so.
“Which friends to friends for ever,
To cities, cities—to allies, allies binds,
For equality is what is right for men;
But less to greater ever hostile grows,
And days of hate begin,”

as is said with poetic grace.


Wherefore the Lord says, “Take my yoke, for it is gentle and
light.”[760] And on the disciples, striving for the pre-eminence, He
enjoins equality with simplicity, saying “that they must become as
little children.”[761] Likewise also the apostle writes, that “no one in
Christ is bond or free, or Greek or Jew. For the creation in Christ
Jesus is new, is equality, free of strife—not grasping—just.” For envy,
and jealousy, and bitterness, stand without the divine choir.
Thus also those skilled in the mysteries forbid “to eat the heart;”
teaching that we ought not to gnaw and consume the soul by
idleness and by vexation, on account of things which happen against
one’s wishes. Wretched, accordingly, was the man whom Homer also
says, wandering alone, “ate his own heart.” But again, seeing the
Gospel supposes two ways—the apostles, too, similarly with all the
prophets—and seeing they call that one “narrow and confined”
which is circumscribed according to the commandments and
prohibitions, and the opposite one, which leads to perdition, “broad
and roomy,” open to pleasures and wrath, and say, “Blessed is the
man who walketh not in the counsel of the ungodly, and standeth
not in the way of sinners.”[762] Hence also comes the fable of
Prodicus of Ceus about Virtue and Vice. And Pythagoras shrinks not
from prohibiting to walk on the public thoroughfares, enjoining the
necessity of not following the sentiments of the many, which are
crude and inconsistent. And Aristocritus, in the first book of his
Positions against Heracliodorus, mentions a letter to this effect:
“Atœeas king of the Scythians to the people of Byzantium: Do not
impair my revenues in case my mares drink your water;” for the
Barbarian indicated symbolically that he would make war on them.
Likewise also the poet Euphorion introduces Nestor saying,
“We have not yet wet the Achæan steeds in Simois.”

Therefore also the Egyptians place Sphinxes before their temples, to


signify that the doctrine respecting God is enigmatical and obscure;
perhaps also that we ought both to love and fear the Divine Being:
to love Him as gentle and benign to the pious; to fear Him as
inexorably just to the impious; for the sphinx shows the image of a
wild beast and of a man together.
CHAPTER VI.
THE MYSTIC MEANING OF THE TABERNACLE AND ITS FURNITURE.

It were tedious to go over all the Prophets and the Law,


specifying what is spoken in enigmas; for almost the whole Scripture
gives its utterances in this way. It may suffice, I think, for any one
possessed of intelligence, for the proof of the point in hand, to select
a few examples.
Now concealment is evinced in the reference of the seven circuits
around the temple, which are made mention of among the Hebrews;
and the equipment on the robe, indicating by the various symbols,
which had reference to visible objects, the agreement which from
heaven reaches down to earth. And the covering and the veil were
variegated with blue, and purple, and scarlet, and linen. And so it
was suggested that the nature of the elements contained the
revelation of God. For purple is from water, linen from the earth;
blue, being dark, is like the air, as scarlet is like fire.
In the midst of the covering and veil, where the priests were
allowed to enter, was situated the altar of incense, the symbol of the
earth placed in the middle of this universe; and from it came the
fumes of incense. And that place intermediate between the inner
veil, where the high priest alone, on prescribed days, was permitted
to enter, and the external court which surrounded it—free to all the
Hebrews—was, they say, the middlemost point of heaven and earth.
But others say it was the symbol of the intellectual world, and that
of sense. The covering, then, the barrier of popular unbelief, was
stretched in front of the five pillars, keeping back those in the
surrounding space.
So very mystically the five loaves are broken by the Saviour, and
fill the crowd of the listeners. For great is the crowd that keep to the
things of sense, as if they were the only things in existence. “Cast
your eyes round, and see,” says Plato, “that none of the uninitiated
listen.” Such are they who think that nothing else exists, but what
they can hold tight with their hands; but do not admit as in the
department of existence, actions and processes of generation, and
the whole of the unseen. For such are those who keep by the five
senses. But the knowledge of God is a thing inaccessible to the ears
and like organs of this kind of people. Hence the Son is said to be
the Father’s face, being the revealer of the Father’s character to the
five senses by clothing Himself with flesh. “But if we live in the
Spirit, let us also walk in the Spirit.”[763] “For we walk by faith, not
by sight,”[764] the noble apostle says. Within the veil, then, is
concealed the sacerdotal service; and it keeps those engaged in it
far from those without.
Again, there is the veil of the entrance into the holy of holies.
Four pillars there are, the sign of the sacred tetrad of the ancient
covenants. Further, the mystic name of four letters which was affixed
to those alone to whom the adytum was accessible, is called Jave,
which is interpreted, “Who is and shall be.” The name of God, too,
among the Greeks contains four letters.
Now the Lord, having come alone into the intellectual world,
enters by His sufferings, introduced into the knowledge of the
Ineffable, ascending above every name which is known by sound.
The lamp, too, was placed to the south of the altar of incense; and
by it were shown the motions of the seven planets, that perform
their revolutions towards the south. For three branches rose on
either side of the lamp, and lights on them; since also the sun, like
the lamp, set in the midst of all the planets, dispenses with a kind of
divine music the light to those above and to those below.
The golden lamp conveys another enigma as a symbol of Christ,
not in respect of form alone, but in his casting light, “at sundry times
and divers manners,”[765] on those who believe on Him and hope,
and who see by means of the ministry of the First-born. And they
say that the seven eyes of the Lord “are the seven spirits resting on
the rod that springs from the root of Jesse.”[766]
North of the altar of incense was placed a table, on which there
was “the exhibition of the loaves;” for the most nourishing of the
winds are those of the north. And thus are signified certain seats of
churches conspiring so as to form one body and one assemblage.
And the things recorded of the sacred ark signify the properties of
the world of thought, which is hidden and closed to the many.
And those golden figures, each of them with six wings, signify
either the two bears, as some will have it, or rather the two
hemispheres. And the name cherubim meant “much knowledge.” But
both together have twelve wings, and by the zodiac and time, which
moves on it, point out the world of sense. It is of them, I think, that
Tragedy, discoursing of Nature, says:

“Unwearied Time circles full in perennial flow,


Producing itself. And the twin-bears
On the swift wandering motions of their wings,
Keep the Atlantean pole.”

And Atlas,[767] the unsuffering pole, may mean the fixed sphere, or
better perhaps, motionless eternity. But I think it better to regard
the ark, so called from the Hebrew word Thebotha,[768] as signifying
something else. It is interpreted, one instead of one in all places.
Whether, then, it is the eighth region and the world of thought, or
God, all-embracing, and without shape, and invisible, that is
indicated, we may for the present defer saying. But it signifies the
repose which dwells with the adoring spirits, which are meant by the
cherubim.
For He who prohibited the making of a graven image, would
never Himself have made an image in the likeness of holy things.
Nor is there at all any composite thing, and creature endowed with
sensation, of the sort in heaven. But the face is a symbol of the
rational soul, and the wings are the lofty ministers and energies of
powers right and left; and the voice is delightsome glory in ceaseless
contemplation. Let it suffice that the mystic interpretation has
advanced so far.
Now the high priest’s robe is the symbol of the world of sense.
The seven planets are represented by the five stones and the two
carbuncles, for Saturn and the Moon. The former is southern, and
moist, and earthy, and heavy; the latter aerial, whence she is called
by some Artemis, as if Aerotomos (cutting the air); and the air is
cloudy. And co-operating as they did in the production of things here
below, those that by Divine Providence are set over the planets are
rightly represented as placed on the breast and shoulders; and by
them was the work of creation, the first week. And the breast is the
seat of the heart and soul.
Differently, the stones might be the various phases of salvation;
some occupying the upper, some the lower parts of the entire body
saved. The three hundred and sixty bells, suspended from the robe,
is the space of a year, “the acceptable year of the Lord,” proclaiming
and resounding the stupendous manifestation of the Saviour.
Further, the broad gold mitre indicates the regal power of the Lord,
“since the head of the church” is the Saviour.[769] The mitre that is
on it [i.e. the head] is, then, a sign of most princely rule; and
otherwise we have heard it said, “The Head of Christ is the God and
Father of our Lord Jesus Christ.”[770] Moreover, there was the
breastplate, comprising the ephod, which is the symbol of work, and
the oracle (λογίον); and this indicated the Word (λόγος) by which it
was framed, and is the symbol of heaven, made by the Word,[771]
and subjected to Christ, the Head of all things, inasmuch as it moves
in the same way, and in a like manner. The luminous emerald
stones, therefore, in the ephod, signify the sun and moon, the
helpers of nature. The shoulder, I take it, is the commencement of
the hand.
The twelve stones, set in four rows on the breast, describe for us
the circle of the zodiac, in the four changes of the year. It was
otherwise requisite that the law and the prophets should be placed
beneath the Lord’s head, because in both Testaments mention is
made of the righteous. For were we to say that the apostles were at
once prophets and righteous, we should say well, “since one and the
self-same Holy Spirit works in all.”[772] And as the Lord is above the
whole world, yea, above the world of thought, so the name
engraven on the plate has been regarded to signify, above all rule
and authority; and it was inscribed with reference both to the
written commandments and the manifestation to sense. And it is the
name of God that is expressed; since, as the Son sees the goodness
of the Father, God the Saviour works, being called the first principle
of all things, which was imaged forth from the invisible God first, and
before the ages, and which fashioned all things which came into
being after itself. Nay more, the oracle[773] exhibits the prophecy
which by the Word cries and preaches, and the judgment that is to
come; since it is the same Word which prophesies, and judges, and
discriminates all things.
And they say that the robe prophesied the ministry in the flesh,
by which He was seen in closer relation to the world. So the high
priest, putting off his consecrated robe (the universe, and the
creation in the universe, were consecrated by Him assenting that,
what was made, was good), washes himself, and puts on the other
tunic—a holy-of-holies one, so to speak—which is to accompany him
into the adytum; exhibiting, as seems to me, the Levite and Gnostic,
as the chief of other priests (those bathed in water, and clothed in
faith alone, and expecting their own individual abode), himself
distinguishing the objects of the intellect from the things of sense,
rising above other priests, hasting to the entrance to the world of
ideas, to wash himself from the things here below, not in water, as
formerly one was cleansed on being enrolled in the tribe of Levi. But
purified already by the gnostic Word in his whole heart, and
thoroughly regulated, and having improved that mode of life
received from the priest to the highest pitch, being quite sanctified
both in word and life, and having put on the bright array of glory,
and received the ineffable inheritance of that spiritual and perfect
man, “which eye hath not seen and ear hath not heard, and it hath
not entered into the heart of man;” and having become son and
friend, he is now replenished with insatiable contemplation face to
face. For there is nothing like hearing the Word Himself, who by
means of the Scripture inspires fuller intelligence. For so it is said,
“And he shall put off the linen robe, which he had put on when he
entered into the holy place; and shall lay it aside there, and wash his
body in water in the holy place, and put on his robe.”[774] But in one
way, as I think, the Lord puts off and puts on by descending into the
region of sense; and in another, he who through Him has believed
puts off and puts on, as the apostle intimated, the consecrated stole.
Thence, after the image of the Lord, the worthiest were chosen from
the sacred tribes to be high priests, and those elected to the kingly
office and to prophecy were anointed.
CHAPTER VII.
THE EGYPTIAN SYMBOLS AND ENIGMAS OF SACRED THINGS.

Whence also the Egyptians did not entrust the mysteries they
possessed to all and sundry, and did not divulge the knowledge of
divine things to the profane; but only to those destined to ascend
the throne, and those of the priests that were judged the worthiest,
from their nurture, culture, and birth. Similar, then, to the Hebrew
enigmas in respect to concealment, are those of the Egyptians also.
Of the Egyptians, some show the sun on a ship, others on a
crocodile. And they signify hereby, that the sun, making a passage
through the delicious and moist air, generates time; which is
symbolized by the crocodile in some other sacerdotal account.
Further, at Diospolis in Egypt, on the temple called Pylon, there was
figured a boy as the symbol of production, and an old man as that of
decay. A hawk, on the other hand, was the symbol of God, as a fish
of hate; and, according to a different symbolism, the crocodile of
impudence. The whole symbol, then, when put together, appears to
teach this: “Oh ye who are born and die, God hates impudence.”
And there are those who fashion ears and eyes of costly material,
and consecrate them, dedicating them in the temples to the gods—
by this plainly indicating that God sees and hears all things. Besides,
the lion is with them the symbol of strength and prowess, as the ox
clearly is of the earth itself, and husbandry and food, and the horse
of fortitude and confidence; while, on the other hand, the sphinx, of
strength combined with intelligence—as it had a body entirely that of
a lion, and the face of a man. Similarly to these, to indicate
intelligence, and memory, and power, and art, a man is sculptured in
the temples. And in what is called among them the Komasiæ of the
gods, they carry about golden images—two dogs, one hawk, and
one ibis; and the four figures of the images they call four letters. For
the dogs are symbols of the two hemispheres, which, as it were, go
round and keep watch; the hawk, of the sun, for it is fiery and
destructive (so they attribute pestilential diseases to the sun); the
ibis, of the moon, likening the shady parts to that which is dark in
plumage, and the luminous to the light. And some will have it that
by the dogs are meant the tropics, which guard and watch the sun’s
passage to the south and north. The hawk signifies the equinoctial
line, which is high and parched with heat, as the ibis the ecliptic. For
the ibis seems, above other animals, to have furnished to the
Egyptians the first rudiments of the invention of number and
measure, as the oblique line did of circles.
CHAPTER VIII.
THE USE OF THE SYMBOLIC STYLE BY POETS AND PHILOSOPHERS.

But it was not only the most highly intellectual of the Egyptians,
but also such of other barbarians as prosecuted philosophy, that
affected the symbolical style. They say, then, that Idanthuris king of
the Scythians, as Pherecydes of Syros relates, sent to Darius, on his
passing the Ister in threat of war, a symbol, instead of a letter,
consisting of a mouse, a frog, a bird, a javelin, a plough. And there
being a doubt in reference to them, as was to be expected,
Orontopagas the Chiliarch said that they were to resign the
kingdom; taking dwellings to be meant by the mouse, waters by the
frog, air by the bird, land by the plough, arms by the javelin. But
Xiphodres interpreted the contrary; for he said, “If we do not take
our flight like birds, or like mice get below the earth, or like frogs
beneath the water, we shall not escape their arrows; for we are not
lords of the territory.”
It is said that Anacharsis the Scythian, while asleep, held his
secret parts with his left hand, and his mouth with his right, to
intimate that both ought to be mastered, but that it was a greater
thing to master the tongue than voluptuousness.
And why should I linger over the barbarians, when I can adduce
the Greeks as exceedingly addicted to the use of the method of
concealment? Androcydes the Pythagorean says the far-famed so-
called Ephesian letters were of the class of symbols. For he said that
ἄσκιον (shadowless) meant darkness, for it has no shadow; and
κατάσκιον (shadowy) light, since it casts with its rays the shadow;
and λίξ is the earth, according to an ancient appellation; and τετράς
is the year, in reference to the seasons; and δαμναμενεύς is the sun,
which overpowers (δαμάζων); and τὰ αἴσια is the true voice. And
then the symbol intimates that divine things have been arranged in
harmonious order—darkness to light, the sun to the year, and the
earth to nature’s processes of production of every sort. Also
Dionysius Thrax, the grammarian, in his book, Respecting the
Exposition of the Symbolical Signification in Circles, says expressly,
“Some signified actions not by words only, but also by symbols: by
words, as is the case of what are called the Delphic maxims,
‘Nothing in excess,’ ‘Know thyself,’ and the like; and by symbols, as
the wheel that is turned in the temples of the gods, derived from the
Egyptians, and the branches that are given to the worshippers. For
the Thracian Orpheus says:
“Whatever works of branches are a care to men on earth,
Not one has one fate in the mind, but all things
Revolve around; and it is not lawful to stand at one point,
But each one keeps an equal part of the race as they began.”

The branches either stand as the symbol of the first food, or they
are that the multitude may know that fruits spring and grow
universally, remaining a very long time; but that the duration of life
allotted to themselves is brief. And it is on this account that they will
have it that the branches are given; and perhaps also that they may
know, that as these, on the other hand, are burned, so also they
themselves speedily leave this life, and will become fuel for fire.
Very useful, then, is the mode of symbolic interpretation for many
purposes; and it is helpful to the right theology, and to piety, and to
the display of intelligence, and the practice of brevity, and the
exhibition of wisdom. “For the use of symbolical speech is
characteristic of the wise man,” appositely remarks the grammarian
Didymus, “and the explanation of what is signified by it.” And indeed
the most elementary instruction of children embraces the
interpretation of the four elements; for it is said that the Phrygians
call water Bedu, as also Orpheus says:
“And bright water is poured down, the Bedu of the nymphs.”

Dion Thytes also seems to write similarly:

“And taking Bedu, pour it on your hands, and turn to divination.”


On the other hand, the comic poet, Philydeus, understands by Bedu
the air, as being (Biodoros) life-giver, in the following lines:

“I pray that I may inhale the salutary Bedu,


Which is the most essential part of health;
Inhale the pure, the unsullied air.”

In the same opinion also concurs Neanthes of Cyzicum, who


writes that the Macedonian priests invoke Bedu, which they interpret
to mean the air, to be propitious to them and to their children. And
Zaps some have ignorantly taken for fire (from ζέσιν, boiling); for so
the sea is called, as Euphorion, in his reply to Theoridas:
“And Zaps, destroyer of ships, wrecked it on the rocks.”

And Dionysius Iambus similarly:


“Briny Zaps moans about the maddened deep.”

Similarly Cratinus the younger, the comic poet:


“Zaps casts forth shrimps and little fishes.”

And Simmias of Rhodes:

“Parent of the Ignetes and the Telchines briny Zaps was born.”[775]

And χθών is the earth (κεχυμένη), spread forth to bigness. And


Plectron, according to some, is the sky (πόλος), according to others,
it is the air, which strikes (πλήσσοντα) and moves to nature and
increase, and which fills all things. But these have not read
Cleanthes the philosopher, who expressly calls Plectron the sun; for
darting his beams in the east, as if striking the world, he leads the
light to its harmonious course. And from the sun it signifies also the
rest of the stars.
And the Sphinx is not the comprehension[776] of the universe,
and the revolution of the world, according to the poet Aratus; but
perhaps it is the spiritual tone which pervades and holds together
the universe. But it is better to regard it as the ether, which holds
together and presses all things; as also Empedocles says:

“But come now, first will I speak of the Sun, the first principle of all things,
From which all, that we look upon, has sprung,
Both earth, and billowy deep, and humid air;
Titan and Ether too, which binds all things around.”

And Apollodorus of Corcyra says that these lines were recited by


Branchus the seer, when purifying the Milesians from plague; for he,
sprinkling the multitude with branches of laurel, led off the hymn
somehow as follows:
“Sing Boys Hecaergus and Hecaerga.”

And the people accompanied him, saying, “Bedu,[777] Zaps, Chthon,


Plectron, Sphinx, Cnaxzbi, Chthyptes, Phlegmos, Drops.” Callimachus
relates the story in iambics. Cnaxzbi is, by derivation, the plague,
from its gnawing (κναίειν) and destroying (διαφθείρειν), and θῦψαι is
to consume with a thunderbolt. Thespis the tragic poet says that
something else was signified by these, writing thus: “Lo, I offer to
thee a libation of white Cnaxzbi, having pressed it from the yellow
nurses. Lo, to thee, O two-horned Pan, mixing Chthyptes cheese
with red honey, I place it on thy sacred altars. Lo, to thee I pour as
a libation the sparkling gleam of Bromius.” He signifies, as I think,
the soul’s first milk-like nutriment of the four-and-twenty elements,
after which solidified milk comes as food. And last, he teaches of the
blood of the vine of the Word, the sparkling wine, the perfecting
gladness of instruction. And Drops is the operating Word, which,
beginning with elementary training, and advancing to the growth of
the man, inflames and illumines man up to the measure of maturity.
The third is said to be a writing copy for children—μάρπτες σφίγξ,
κλώψ ζυνχθηδόν. And it signifies, in my opinion, that by the
arrangement of the elements and of the world, we must advance to
the knowledge of what is more perfect, since eternal salvation is
attained by force and toil; for μάρψαι is to grasp. And the harmony
of the world is meant by the Sphinx; and ζυνχθηδόν means
difficulty; and κλὼψς means at once the secret knowledge of the
Lord and day. Well! does not Epigenes, in his book on the Poetry of
Orpheus, in exhibiting the peculiarities found in Orpheus, say that by
“the curved rods” (κεραίσι) is meant “ploughs;” and by the warp
(στήμοσι), the furrows; and the woof (μίτος) is a figurative
expression for the seed; and that the tears of Zeus signify a shower;
and that the “parts” (μοῖραι) are, again, the phases of the moon, the
thirtieth day, and the fifteenth, and the new moon, and that Orpheus
accordingly calls them “white-robed,” as being parts of the light?
Again, that the Spring is called “flowery,” from its nature; and Night
“still,” on account of rest; and the Moon “Gorgonian,” on account of
the face in it; and that the time in which it is necessary to sow is
called Aphrodite by the “Theologian.”[778] In the same way, too, the
Pythagoreans figuratively called the planets the “dogs of
Persephone;” and to the sea they applied the metaphorical
appellation of “the tears of Kronus.” Myriads on myriads of
enigmatical utterances by both poets and philosophers are to be
found; and there are also whole books which present the mind of
the writer veiled, as that of Heraclitus On Nature, who on this very
account is called “Obscure.” Similar to this book is the Theology of
Pherecydes of Syrus; for Euphorion the poet, and the Causes of
Callimachus, and the Alexandra of Lycophron, and the like, are
proposed as an exercise in exposition to all the grammarians.
It is, then, proper that the Barbarian philosophy, on which it is our
business to speak, should prophesy also obscurely and by symbols,
as was evinced. Such are the injunctions of Moses: “These common
things, the sow, the hawk, the eagle, and the raven, are not to be
eaten.”[779] For the sow is the emblem of voluptuous and unclean
lust of food, and lecherous and filthy licentiousness in venery, always
prurient, and material, and lying in the mire, and fattening for
slaughter and destruction.
Again, he commands to eat that which parts the hoof and
ruminates; “intimating,” says Barnabas, “that we ought to cleave to
those who fear the Lord, and meditate in their heart on that portion
of the word which they have received, to those who speak and keep
the Lord’s statutes, to those to whom meditation is a work of
gladness, and who ruminate on the word of the Lord. And what is
the parted hoof? That the righteous walks in this world, and expects
the holy eternity to come.” Then he adds, “See how well Moses
enacted. But whence could they understand or comprehend these
things? We who have rightly understood speak the commandments
as the Lord wished; wherefore He circumcised our ears and hearts,
that we may comprehend these things. And when he says, ‘Thou
shalt not eat the eagle, the hawk, the kite, and the crow;’ he says,
‘Thou shalt not adhere to or become like those men who know not
how to procure for themselves subsistence by toil and sweat, but
live by plunder, and lawlessly.’ For the eagle indicates robbery, the
hawk injustice, and the raven greed. It is also written, ‘With the
innocent man thou wilt be innocent, and with the chosen choice, and
with the perverse thou shalt pervert.’[780] It is incumbent on us to
cleave to the saints, because they that cleave to them shall be
sanctified.”
Thence Theognis writes:
“For from the good you will learn good things;
But if you mix with the bad, you will destroy any mind you may have.”

And when, again, it is said in the ode, “For He hath triumphed


gloriously: the horse and his rider hath He cast into the sea;”[781]
the many-limbed and brutal affection, lust, with the rider mounted,
who gives the reins to pleasures, “He has cast into the sea,”
throwing them away into the disorders of the world. Thus also Plato,
in his book On the Soul, says that the charioteer and the horse that
ran off—the irrational part, which is divided in two, into anger and
concupiscence—fall down; and so the myth intimates that it was
through the licentiousness of the steeds that Phaëthon was thrown
out. Also in the case of Joseph: the brothers having envied this
young man, who by his knowledge was possessed of uncommon
foresight, stripped off the coat of many colours, and took and threw
him into a pit (the pit was empty, it had no water), rejecting the
good man’s varied knowledge, springing from his love of instruction;
or, in the exercise of the bare faith, which is according to the law,
they threw him into the pit empty of water, selling him into Egypt,
which was destitute of the divine word. And the pit was destitute of
knowledge; into which being thrown and stript of his knowledge, he
that had become unconsciously wise, stript of knowledge, seemed
like his brethren. Otherwise interpreted, the coat of many colours is
lust, which takes its way into a yawning pit. “And if one open up or
hew out a pit,” it is said, “and do not cover it, and there fall in there
a calf or ass, the owner of the pit shall pay the price in money, and
give it to his neighbour; and the dead body shall be his.”[782] Here
add that prophecy: “The ox knoweth his owner, and the ass his
master’s crib: but Israel hath not understood me.”[783] In order,
then, that none of those, who have fallen in with the knowledge
taught by thee, may become incapable of holding the truth, and
disobey and fall away, it is said, Be thou sure in the treatment of the
word, and shut up the living spring in the depth from those who
approach irrationally, but reach drink to those that thirst for truth.
Conceal it, then, from those who are unfit to receive the depth of
knowledge, and so cover the pit. The owner of the pit, then, the
Gnostic, shall himself be punished, incurring the blame of the others
stumbling, and of being overwhelmed by the greatness of the word,
he himself being of small capacity; or transferring the worker into
the region of speculation, and on that account dislodging him from
offhand faith. “And will pay money,” rendering a reckoning, and
submitting his accounts to the “omnipotent Will.”
This, then, is the type of “the law and the prophets which were
until John;”[784] while he, though speaking more perspicuously as no
longer prophesying, but pointing out as now present, Him, who was
proclaimed symbolically from the beginning, nevertheless said, “I am
not worthy to loose the latchet of the Lord’s shoe.”[785] For he
confesses that he is not worthy to baptize so great a Power; for it
behoves those, who purify others, to free the soul from the body
and its sins, as the foot from the thong. Perhaps also this signified
the final exertion of the Saviour’s power toward us—the immediate, I
mean—that by His presence, concealed in the enigma of prophecy,
inasmuch as he, by pointing out to sight Him that had been
prophesied of, and indicating the Presence which had come, walking
forth into the light, loosed the latchet of the oracles of the [old]
economy, by unveiling the meaning of the symbols.
And the observances practised by the Romans in the case of wills
have a place here; those balances and small coins to denote justice,
and freeing of slaves, and rubbing of the ears. For these
observances are, that things may be transacted with justice; and
those for the dispensing of honour; and the last, that he who
happens to be near, as if a burden were imposed on him, should
stand and hear and take the post of mediator.
CHAPTER IX.
REASONS FOR VEILING THE TRUTH IN SYMBOLS.

But, as appears, I have, in my eagerness to establish my point,


insensibly gone beyond what is requisite. For life would fail me to
adduce the multitude of those who philosophize in a symbolical
manner. For the sake, then, of memory and brevity, and of attracting
to the truth, such are the scriptures of the Barbarian philosophy.
For only to those who often approach them, and have given them
a trial by faith and in their whole life, will they supply the real
philosophy and the true theology. They also wish us to require an
interpreter and guide. For so they considered, that, receiving truth at
the hands of those who knew it well, we would be more earnest and
less liable to deception, and those worthy of them would profit.
Besides, all things that shine through a veil show the truth grander
and more imposing; as fruits shining through water, and figures
through veils, which give added reflections to them. For, in addition
to the fact that things unconcealed are perceived in one way, the
rays of light shining round reveal defects. Since, then, we may draw
several meanings, as we do from what is expressed in veiled form,
such being the case, the ignorant and unlearned man fails. But the
Gnostic apprehends. Now, then, it is not wished that all things
should be exposed indiscriminately to all and sundry, or the benefits
of wisdom communicated to those who have not even in a dream
been purified in soul, (for it is not allowed to hand to every chance
comer what has been procured with such laborious efforts); nor are
the mysteries of the word to be expounded to the profane.
They say, then, that Hipparchus the Pythagorean, being guilty of
writing the tenets of Pythagoras in plain language, was expelled
from the school, and a pillar raised for him as if he had been dead.
Wherefore also in the Barbarian philosophy they call those dead who
have fallen away from the dogmas, and have placed the mind in
subjection to carnal passions. “For what fellowship hath
righteousness and iniquity?” according to the divine apostle. “Or
what communion hath light with darkness? or what concord hath
Christ with Belial? or what portion hath the believer with the
unbeliever?”[786] For the honours of the Olympians and of mortals
lie apart. “Wherefore also go forth from the midst of them, and be
separated, saith the Lord, and touch not the unclean thing; and I will
receive you, and will be to you for a Father, and ye shall be my sons
and daughters.”[787]
It was not only the Pythagoreans and Plato, then, that concealed
many things; but the Epicureans too say that they have things that
may not be uttered, and do not allow all to peruse those writings.
The Stoics also say that by the first Zeno things were written which
they do not readily allow disciples to read, without their first giving
proof whether or not they are genuine philosophers. And the
disciples of Aristotle say that some of their treatises are esoteric, and
others common and exoteric. Further, those who instituted the
mysteries, being philosophers, buried their doctrines in myths, so as
not to be obvious to all. Did they then, by veiling human opinions,
prevent the ignorant from handling them; and was it not more
beneficial for the holy and blessed contemplation of realities to be
concealed? But it was not only the tenets of the Barbarian
philosophy, or the Pythagorean myths. But even those myths in Plato
(in the Republic, that of Hero the Armenian; and in the Gorgias, that
of Æacus and Rhadamanthus; and in the Phædo, that of Tartarus;
and in the Protagoras, that of Prometheus and Epimetheus; and
besides these, that of the war between the Atlantini and the
Athenians in the Atlanticum) are to be expounded allegorically, not
absolutely in all their expressions, but in those which express the
general sense. And these we shall find indicated by symbols under
the veil of allegory. Also the association of Pythagoras, and the
twofold intercourse with the associates which designates the
majority, hearers (ἀκουσματικοι), and the others that have a genuine
attachment to philosophy, disciples (μαθεματικοί), yet signified that
something was spoken to the multitude, and something concealed
from them. Perchance, too, the twofold species of the Peripatetic
teaching—that called probable, and that called knowable—came very
near the distinction between opinion on the one hand, and glory and
truth on the other.
“To win the flowers of fair renown from men,
Be not induced to speak aught more than right.”

The Ionic muses accordingly expressly say, “That the majority of


people, wise in their own estimation, follow minstrels and make use
of laws, knowing that many are bad, few good; but that the best
pursue glory: for the best make choice of the everlasting glory of
men above all. But the multitude cram themselves like brutes,
measuring happiness by the belly and the pudenda, and the basest
things in us.” And the great Parmenides of Elea is introduced
describing thus the teaching of the two ways:
“The one is the dauntless heart of convincing truth;
The other is in the opinions of men, in whom is no true faith.”
CHAPTER X.
THE OPINION OF THE APOSTLES ON VEILING THE MYSTERIES OF THE FAITH.

Rightly, therefore, the divine apostle says, “By revelation the


mystery was made known to me (as I wrote before in brief, in
accordance with which, when ye read, ye may understand my
knowledge in the mystery of Christ), which in other ages was not
made known to the sons of men, as it is now revealed to His holy
apostles and prophets.”[788] For there is an instruction of the
perfect, of which, writing to the Colossians, he says, “We cease not
to pray for you, and beseech that ye may be filled with the
knowledge of His will in all wisdom and spiritual understanding; that
ye may walk worthy of the Lord to all pleasing; being fruitful in every
good work, and increasing in the knowledge of God; strengthened
with all might according to the glory of His power.”[789] And again he
says, “According to the disposition of the grace of God which is given
me, that ye may fulfil the word of God; the mystery which has been
hid from ages and generations, which now is manifested to His
saints: to whom God wished to make known what is the riches of
the glory of this mystery among the nations.”[790] So that, on the
one hand, then, are the mysteries which were hid till the time of the
apostles, and were delivered by them as they received from the
Lord, and, concealed in the Old Testament, were manifested to the
saints. And, on the other hand, there is “the riches of the glory of
the mystery in the Gentiles,” which is faith and hope in Christ; which
in another place he has called the “foundation.”[791] And again, as if
in eagerness to divulge this knowledge, he thus writes: “Warning
every man in all wisdom, that we may present every man (the whole
man) perfect in Christ;” not every man simply, since no one would
be unbelieving. Nor does he call every man who believes in Christ
perfect; but he says all the man, as if he said the whole man, as if
purified in body and soul. For that the knowledge does not appertain
to all, he expressly adds: “Being knit together in love, and unto all
the riches of the full assurance of knowledge, to the
acknowledgment of the mystery of God in Christ, in whom are hid all
the treasures of wisdom and of knowledge.”[792] “Continue in prayer,
watching therein with thanksgiving.”[793] And thanksgiving has place
not for the soul and spiritual blessings alone, but also for the body,
and for the good things of the body. And he still more clearly reveals
that knowledge belongs not to all, by adding: “Praying at the same
time for you, that God would open to us a door to speak the mystery
of Christ, for which I am bound; that I may make it known as I
ought to speak.”[794] For there were certainly, among the Hebrews,
some things delivered unwritten. “For when ye ought to be teachers
for the time,” it is said, as if they had grown old in the Old
Testament, “ye have again need that one teach you which be the
first principles of the oracles of God; and are become such as have
need of milk, and not of solid food. For every one that partaketh of
milk is unskilful in the word of righteousness; for he is a babe, being
instructed with the first lessons. But solid food belongs to those who
are of full age, who by reason of use have their senses exercised so
as to distinguish between good and evil. Wherefore, leaving the first
principles of the doctrine of Christ, let us go on to perfection.”[795]
Barnabas, too, who in person preached the word along with the
apostle in the ministry of the Gentiles, says, “I write to you most
simply, that ye may understand.” Then below, exhibiting already a
clearer trace of gnostic tradition, he says, “What says the other
prophet Moses to them? Lo, thus saith the Lord God, Enter ye into
the good land which the Lord God sware, the God of Abraham, and
Isaac, and Jacob; and ye received for an inheritance that land,
flowing with milk and honey. What says knowledge? Learn, hope, it
says, in Jesus, who is to be manifested to you in the flesh. For man
is the suffering land; for from the face of the ground was the
formation of Adam. What, then, does it say in reference to the good
land, flowing with milk and honey? Blessed be our Lord, brethren,
who has put into our hearts wisdom, and the understanding of His
secrets. For the prophet says, “Who shall understand the Lord’s
parable but the wise and understanding, and he that loves his Lord?”
It is but for few to comprehend these things. For it is not in the way
of envy that the Lord announced in a Gospel, “My mystery is to me,
and to the sons of my house;”[796] placing the election in safety, and
beyond anxiety; so that the things pertaining to what it has chosen
and taken may be above the reach of envy. For he who has not the
knowledge of good is wicked: for there is one good, the Father; and
to be ignorant of the Father is death, as to know Him is eternal life,
through participation in the power of the incorrupt One. And to be
incorruptible is to participate in divinity; but revolt from the
knowledge of God brings corruption. Again the prophet says: “And I
will give thee treasures, concealed, dark, unseen; that they may
know that I am the Lord.”[797] Similarly David sings: “For, lo, Thou
hast loved truth; the obscure and hidden things of wisdom hast
Thou showed me.”[798] “Day utters speech to day”[799] (what is
clearly written), “and night to night proclaims knowledge” (which is
hidden in a mystic veil); “and there are no words or utterances
whose voices shall not be heard” by God, who said, “Shall one do
what is secret, and I shall not see him?”
Wherefore instruction, which reveals hidden things, is called
illumination, as it is the teacher only who uncovers the lid of the ark,
contrary to what the poets say, that “Zeus stops up the jar of good
things, but opens that of evil.” “For I know,” says the apostle, “that
when I come to you, I shall come in the fulness of the blessing of
Christ;”[800] designating the spiritual gift, and the gnostic
communication, which being present he desires to impart to them
present as “the fulness of Christ, according to the revelation of the
mystery sealed in the ages of eternity, but now manifested by the
prophetic Scriptures, according to the command of the eternal God,
made known to all the nations, in order to the obedience of faith,”
that is, those of the nations who believe that it is. But only to a few
of them is shown what those things are which are contained in the
mystery.
Rightly then, Plato, in the epistles, treating of God, says: “We
must speak in enigmas; that should the tablet come by any
mischance on its leaves either by sea or land, he who reads may
remain ignorant.” For the God of the universe, who is above all
speech, all conception, all thought, can never be committed to
writing, being inexpressible even by His own power. And this too
Plato showed, by saying: “Considering, then, these things, take care
lest some time or other you repent on account of the present things,
departing in a manner unworthy. The greatest safeguard is not to
write, but learn; for it is utterly impossible that what is written will
not vanish.”
Akin to this is what the holy Apostle Paul says, preserving the
prophetic and truly ancient secret from which the teachings that
were good were derived by the Greeks: “Howbeit we speak wisdom
among them who are perfect; but not the wisdom of this world, or
of the princes of this world, that come to nought; but we speak the
wisdom of God hidden in a mystery.”[801] Then proceeding, he thus
inculcates the caution against the divulging of his words to the
multitude in the following terms: “And I, brethren, could not speak
to you as to spiritual, but as to carnal, even to babes in Christ. I
have fed you with milk, not with meat: for ye were not yet able;
neither are ye now able. For ye are yet carnal.”[802]
If, then, “the milk” is said by the apostle to belong to the babes,
and “meat” to be the food of the full-grown, milk will be understood
to be catechetical instruction—the first food, as it were, of the soul.
And meat is the mystic contemplation; for this is the flesh and the
blood of the Word, that is, the comprehension of the divine power
and essence. “Taste and see that the Lord is Christ,”[803] it is said.
For so He imparts of Himself to those who partake of such food in a
more spiritual manner; when now the soul nourishes itself, according
to the truth-loving Plato. For the knowledge of the divine essence is
the meat and drink of the divine Word. Wherefore also Plato says, in
the second book of the Republic, “It is those that sacrifice not a sow,
but some great and difficult sacrifice,” who ought to inquire
respecting God. And the apostle writes, “Christ our passover was
sacrificed for us;”[804]—a sacrifice hard to procure, in truth, the Son
of God consecrated for us.
CHAPTER XI.
ABSTRACTION FROM MATERIAL THINGS NECESSARY IN ORDER TO ATTAIN TO
THE TRUE KNOWLEDGE OF GOD.

Now the sacrifice which is acceptable to God is unswerving


abstraction from the body and its passions. This is the really true
piety. And is not, on this account, philosophy rightly called by
Socrates the practice of Death? For he who neither employs his eyes
in the exercise of thought, nor draws aught from his other senses,
but with pure mind itself applies to objects, practises the true
philosophy. This is, then, the import of the silence of five years
prescribed by Pythagoras, which he enjoined on his disciples; that,
abstracting themselves from the objects of sense, they might with
the mind alone contemplate the Deity. It was from Moses that the
chief of the Greeks drew these philosophical tenets. For he
commands holocausts to be skinned and divided into parts. For the
gnostic soul must be consecrated to the light, stript of the
integuments of matter, devoid of the frivolousness of the body and
of all the passions, which are acquired through vain and lying
opinions, and divested of the lusts of the flesh. But the most of men,
clothed with what is perishable, like cockles, and rolled all round in a
ball in their excesses, like hedgehogs, entertain the same ideas of
the blessed and incorruptible God as of themselves. But it has
escaped their notice, though they be near us, that God has
bestowed on us ten thousand things in which He does not share:
birth, being Himself unborn; food, He wanting nothing; and growth,
He being always equal; and long life and immortality, He being
immortal and incapable of growing old. Wherefore let no one
imagine that hands, and feet, and mouth, and eyes, and going in
and coming out, and resentments and threats, are said by the
Hebrews to be attributes of God. By no means; but that certain of
these appellations are used more sacredly in an allegorical sense,
which, as the discourse proceeds, we shall explain at the proper
time.
“Wisdom of all medicines is the Panacea,” writes Callimachus in
the Epigrams. “And one becomes wise from another, both in past
times and at present,” says Bacchylides in the Pæans; “for it is not
very easy to find the portals of unutterable words.” Beautifully,
therefore, Isocrates writes in the Panathenaic, having put the
question, “Who, then, are well trained?” adds, “First, those who
manage well the things which occur each day, whose opinion jumps
with opportunity, and is able for the most part to hit on what is
beneficial; then those who behave becomingly and rightly to those
who approach them, who take lightly and easily annoyances and
molestations offered by others, but conduct themselves as far as
possible, to those with whom they have intercourse, with
consummate care and moderation; further, those who have the
command of their pleasures, and are not too much overcome by
misfortunes, but conduct themselves in the midst of them with
manliness, and in a way worthy of the nature which we share; fourth
—and this is the greatest—those who are not corrupted by
prosperity, and are not put beside themselves, or made haughty, but
continue in the class of sensible people.” Then he puts on the top-
stone of the discourse: “Those who have the disposition of their soul
well suited not to one only of these things, but to them all—those I
assert to be wise and perfect men, and to possess all the virtues.”
Do you see how the Greeks deify the gnostic life (though not
knowing how to become acquainted with it)? And what knowledge it
is, they know not even in a dream. If, then, it is agreed among us
that knowledge is the food of reason, “blessed truly are they,”
according to the scripture, “who hunger and thirst after truth: for
they shall be filled” with everlasting food. In the most wonderful
harmony with these words, Euripides, the philosopher of the drama,
is found in the following words,—making allusion, I know not how,
at once to the Father and the Son:
“To thee, the lord of all, I bring
Cakes and libations too, O Zeus,
Or Hades would’st thou choose be called;
Do thou accept my offering of all fruits,
Rare, full, poured forth.”

For a whole burnt-offering and rare sacrifice for us is Christ. And that
unwittingly he mentions the Saviour, he will make plain, as he adds:
“For thou who, ’midst the heavenly gods,
Jove’s sceptre sway’st, dost also share
The rule of those on earth.”

Then he says expressly:

“Send light to human souls that fain would know


Whence conflicts spring, and what the root of ills,
And of the blessed gods to whom due rites
Of sacrifice we needs must pay, that so
We may from troubles find repose.”

It is not then without reason that in the mysteries that obtain among
the Greeks, lustrations hold the first place; as also the laver among
the Barbarians. After these are the minor mysteries, which have
some foundation of instruction and of preliminary preparation for
what is to come after; and the great mysteries, in which nothing
remains to be learned of the universe, but only to contemplate and
comprehend nature and things.
We shall understand the mode of purification by confession, and
that of contemplation by analysis, advancing by analysis to the first
notion, beginning with the properties underlying it; abstracting from
the body its physical properties, taking away the dimension of depth,
then that of breadth, and then that of length. For the point which
remains is a unit, so to speak, having position; from which if we
abstract position, there is the conception of unity.
If, then, abstracting all that belongs to bodies and things called
incorporeal, we cast ourselves into the greatness of Christ, and
thence advance into immensity by holiness, we may reach somehow
to the conception of the Almighty, knowing not what He is, but what
He is not. And form and motion, or standing, or a throne, or place,
or right hand or left, are not at all to be conceived as belonging to
the Father of the universe, although it is so written. But what each
of these means will be shown in its proper place. The First Cause is
not then in space, but above both space, and time, and name, and
conception.
Wherefore also Moses says, “Show thyself to me”[805]—intimating
most clearly that God is not capable of being taught by man, or
expressed in speech, but to be known only by His own power. For
inquiry was obscure and dim; but the grace of knowledge is from
Him by the Son. Most clearly Solomon shall testify to us, speaking
thus: “The prudence of man is not in me: but God giveth me
wisdom, and I know holy things.”[806] Now Moses, describing
allegorically the divine prudence, called it the tree of life planted in
Paradise; which Paradise may be the world in which all things
proceeding from creation grow. In it also the Word blossomed and
bore fruit, being “made flesh,” and gave life to those “who had
tasted of His graciousness;” since it was not without the wood of the
tree that He came to our knowledge. For our life was hung on it, in
order that we might believe. And Solomon again says: “She is a tree
of immortality to those who take hold of her.”[807] “Behold, I set
before thy face life and death, to love the Lord thy God, and to walk
in His ways, and hear His voice, and trust in life. But if ye transgress
the statutes and the judgments which I have given you, ye shall be
destroyed with destruction. For this is life, and the length of thy
days, to love the Lord thy God.”[808]
Again: “Abraham, when he came to the place which God told him
of on the third day, looking up, saw the place afar off.”[809] For the
first day is that which is constituted by the sight of good things; and
the second is the soul’s[810] best desire; on the third, the mind
perceives spiritual things, the eyes of the understanding being
opened by the Teacher who rose on the third day. The three days
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like