Semantic-ng2
Installation
Using Angular CLI
Open terminal, go into folder where you want to create the project and run these commands
npm install -g angular-cling new project-name
Go into the newly created folder and run
npm install -S semantic-ng2
After installing the semantic-ng2 package, edit following files:
angular-cli-build.js
vendorNpmFiles: ... 'semantic-ng2/**/*'
src/system-config.ts
; ;
src/index.html
Into the head
tag
Before </body>
tag
src/main.ts
;; bootstrap... , ;
You can now use semantic-ng2 into all your components !
Usage
The import for all semantic-ng2 package classes is
;
Edit src/app/project-name.component.ts
file and add
;
Add into @Component
annotation
@
Edit src/app/project-name.component.html
file and add
Button
Finally, in the terminal, start the project
ng server
Now open your browser and go to the http://localhost:4200/
url.
You should be able to see a red circular button with a user icon and Button
text :)