@@ -9,23 +9,39 @@ Semantic UI Angular 2 Integrations, written in pure AngularJS - **no JQuery requ
99## Installation
1010
1111To install this library, run:
12-
1312``` bash
1413$ npm install ng2-semantic-ui --save
1514```
1615
17- Add a reference to your ` index.html ` file: (also ensure you have a reference to the Semantic UI CSS file)
18-
16+ Next include the Semantic UI CSS file in your ` index.html ` (you can include a manually compiled one if you use themes):
1917``` html
20- <script src = " node_modules/ng2- semantic-ui/bundles/ng2- semantic-ui .min.js " ></ script >
18+ <link rel = " stylesheet " href = " https://cdnjs.cloudflare.com/ajax/libs/ semantic-ui/2.2.4/ semantic.min.css " >
2119```
2220
23- Start using the directives:
21+ Once installed you need to import the main module:
22+ ``` ts
23+ import {SuiModule } from ' ng2-semantic-ui' ;
24+ ```
2425
26+ Finally import the main module into your application module:
2527``` ts
26- import {DIRECTIVES } from ` ng2-semantic-ui/ng2-semantic-ui';
28+ import {SuiModule } from ' ng2-semantic-ui' ;
29+
30+ @NgModule ({
31+ declarations: [AppComponent , ... ],
32+ imports: [SuiModule , ... ],
33+ bootstrap: [AppComponent ]
34+ })
35+ export class AppModule {}
2736```
2837
38+ Now you're good to go!
39+
40+ ## Dependencies
41+
42+ * [ Angular 2] ( https://angular.io ) (2.0.0-rc.5)
43+ * [ Semantic UI CSS] ( http://semantic-ui.com/ ) (jQuery is ** not** required)
44+
2945## Components
3046
3147The current list of available components with links to their docs is below:
@@ -39,54 +55,21 @@ The current list of available components with links to their docs is below:
3955* [ Progress] ( http://edcarroll.github.io/ng2-semantic-ui/#/components/progress )
4056* [ Rating] ( http://edcarroll.github.io/ng2-semantic-ui/#/components/rating )
4157* [ Search] ( http://edcarroll.github.io/ng2-semantic-ui/#/components/search )
58+ * [ Select] ( http://edcarroll.github.io/ng2-semantic-ui/#/components/select )
4259* [ Tab] ( http://edcarroll.github.io/ng2-semantic-ui/#/components/tab )
4360
44- ## Quick start (from scratch )
45-
46- Clone the [angular2 - quickstart ](https :// github.com/valor-software/angular2-quickstart) repository, and set everything up.
47-
48- Add the following lines to your ` index.html ` :
49- ` ` ` html
50- <script src="node_modules/ng2-semantic-ui/bundles/ng2-semantic-ui.min.js"></script>
51- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.css">
52- ` ` `
53-
54- Update your ` app.component.ts ` to be the following :
55-
56- ` ` ` ts
57- import {Component} from 'angular2/core';
58- import {CHECKBOX_DIRECTIVES} from 'ng2-semantic-ui/ng2-semantic-ui';
59-
60- @Component({
61- selector: 'my-app',
62- directives: [CHECKBOX_DIRECTIVES],
63- template: `
64- < sui - checkbox > Checkbox example < / sui - checkbox >
65- `
66- })
67- export class AppComponent {}
68- ` ` `
69-
70- And you ' re good to go!
71-
7261## Development
7362
7463To generate all library ` *.js ` , ` *.js.map ` and ` *.d.ts ` files:
7564
7665``` bash
77- $ npm run tsc
78- ` ` `
79-
80- To run the demo app :
81- ` ` ` bash
82- $ npm run demo
66+ $ npm run compile
67+ # use compile:w to watch for changes
8368```
8469
85- To compile the demo app without running it :
86-
70+ To run the demo app (you must have [ Angular-CLI] ( https://github.com/angular/angular-cli ) installed):
8771``` bash
88- $ npm run tsc-demo
89- # use tsc-demo:w to watch for changes
72+ $ ng serve
9073```
9174
9275## License
0 commit comments