Fireship · @fireship
Angular CLI - The Basics
Uploaded May 14, 2018 · Length 10:50
Summary
Learn how to use the Angular CLI to automate tasks, generate boilerplate code, and speed up development time.
- angular cli
- angular development
- cli automation
- boilerplate code generation
- angular tutorial
- angular basics
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
[Music]
- 0:01
today I'm starting a new video series
- 0:04
called the basics it will consist of
- 0:06
five to ten videos designed to teach you
- 0:08
the fundamentals of angular six to kick
- 0:10
things off we're going to start with one
- 0:12
of the most powerful features of angular
- 0:14
which is the CLI a ton of new features
- 0:16
were added to the CLI in version 6 and
- 0:19
my goal is to show you how to use it
- 0:20
effectively to dramatically speed up the
- 0:22
development time of your app if you're
- 0:24
new to the channel make sure to LIKE and
- 0:25
subscribe and grab the full source code
- 0:27
from angular firebase comm so the main
- 0:30
goal of angular's command-line interface
- 0:32
is to automate things that you would
- 0:34
otherwise have to do manually and it
- 0:36
does a really good job of that compared
- 0:37
to what other web frameworks offer the
- 0:40
reason I chose it as the topic for this
- 0:42
first basics video is because you really
- 0:44
need to know how to use the CLI before
- 0:45
you can use angular effectively to get
- 0:48
started you want to bring up a command
- 0:50
line terminal which I'm doing here in vs
- 0:52
code then run npm install angular CLI
- 0:55
flag global that should install version
- 0:58
6.0 or greater on your system giving you
- 1:00
access to the ng command you can verify
- 1:03
the install by running an ng flag v
- 1:05
which will print out some information
- 1:07
about your local development environment
- 1:09
then the first command that you'll run
- 1:11
is ng new the new command will generate
- 1:14
all of the boilerplate code that you
- 1:16
need to start a brand new angular
- 1:17
project from scratch you'll go ahead and
- 1:19
say ng new with the name of your app and
- 1:22
then there's a number of different
- 1:23
options that you can pass in with the
- 1:25
command let's say you want to use a CSS
- 1:27
extension you can simply pass in the
- 1:29
style flag along with sass last stylist
- 1:32
or whatever you want to use and if you
- 1:35
want to take advantage of angular's
- 1:36
router you can pass in the routing
- 1:38
option and that will automatically
- 1:40
generate the router for you there's a
- 1:42
bunch of other options which you can
- 1:43
check out on the documentation on github
- 1:46
but I use these two options very
- 1:48
frequently when you execute this command
- 1:50
it's going to generate a new directory
- 1:52
based on the name of your app then it
- 1:54
creates all the files necessary to build
- 1:56
and test an angular app now that we've
- 1:59
created this directory we'll go ahead


