@@ -20,25 +20,6 @@ ng serve
20
20
```
21
21
Navigate to http://localhost:4200/ . The app will automatically reload if you change any of the source files.
22
22
23
- ### Build Targets and Environment Files
24
-
25
- ` ng build ` can specify both a build target (` --target=production ` or ` --target=development ` ) and an
26
- environment file to be used with that build (` --environment=dev ` or ` --environment=prod ` ).
27
- By default, the development build target and environment are used.
28
-
29
- The mapping used to determine which environment file is used can be found in ` angular-cli.json ` :
30
-
31
- ``` json
32
- "environments" : {
33
- "source" : " environments/environment.ts" ,
34
- "dev" : " environments/environment.ts" ,
35
- "prod" : " environments/environment.prod.ts"
36
- }
37
- ```
38
-
39
- These options also apply to the serve command. If you do not pass a value for ` environment ` ,
40
- it will default to ` dev ` for ` development ` and ` prod ` for ` production ` .
41
-
42
23
### Bundling
43
24
44
25
All builds make use of bundling, and using the ` --prod ` flag in ` ng build --prod `
@@ -61,52 +42,6 @@ ng e2e
61
42
Before running the tests make sure you are serving the app via ` ng serve ` .
62
43
End-to-end tests are run via [ Protractor] ( https://angular.github.io/protractor/ ) .
63
44
64
- ### Global styles
65
-
66
- The ` styles.css ` file allows users to add global styles and supports
67
- [ CSS imports] ( https://developer.mozilla.org/en/docs/Web/CSS/@import ) .
68
-
69
- If the project is created with the ` --style=sass ` option, this will be a ` .sass `
70
- file instead, and the same applies to ` scss/less/styl ` .
71
-
72
- You can add more global styles via the ` apps[0].styles ` property in ` angular-cli.json ` .
73
-
74
- ### Global Library Installation
75
-
76
- Some javascript libraries need to be added to the global scope, and loaded as if
77
- they were in a script tag. We can do this using the ` apps[0].scripts ` and
78
- ` apps[0].styles ` properties of ` angular-cli.json ` .
79
-
80
- As an example, to use [ Bootstrap 4] ( http://v4-alpha.getbootstrap.com/ ) this is
81
- what you need to do:
82
-
83
- First install Bootstrap from ` npm ` :
84
-
85
- ``` bash
86
- npm install bootstrap@next
87
- ```
88
-
89
- Then add the needed script files to ` apps[0].scripts ` :
90
-
91
- ``` json
92
- "scripts" : [
93
- " ../node_modules/jquery/dist/jquery.js" ,
94
- " ../node_modules/tether/dist/js/tether.js" ,
95
- " ../node_modules/bootstrap/dist/js/bootstrap.js"
96
- ],
97
- ```
98
-
99
- Finally add the Bootstrap CSS to the ` apps[0].styles ` array:
100
- ``` json
101
- "styles" : [
102
- " ../node_modules/bootstrap/dist/css/bootstrap.css" ,
103
- " styles.css"
104
- ],
105
- ```
106
-
107
- Restart ` ng serve ` if you're running it, and Bootstrap 4 should be working on
108
- your app.
109
-
110
45
### Additional Commands
111
46
* [ ng new] ( new )
112
47
* [ ng update] ( update )
0 commit comments