eng-ng-semantic
TypeScript icon, indicating that this package has built-in type declarations

1.1.13 • Public • Published

GitHub version Dependency Status Build Status MIT licensed

Angular2 & Semantic UI

Angular 2
Angular2 - Semantic UI

Live demo

ng-semantic.herokuapp.com

Angular 2 QuickStart with ngSemantic

https://github.com/vladotesanovic/angular2-quickstart-ngsemantic

Angular 2 CLI with ngSemantic

https://github.com/vladotesanovic/angular2-cli-webpack

Important!

  • Angular 2
  • Semantic UI version: 2.2.2

Installation

npm install ng-semantic --save

Semantic UI ( minified versions of css and js ) must be loaded in index.html

<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.css">
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.2/semantic.min.js"></script>

Angular CLI configuration ( Webpack )

Install ng-semantic and jQuery

npm install ng-semantic --save
 
npm install jquery --save

Add semantic.min.css, semantic.min.js, jquery to the angular-cli.json as follows:

 
...
 
"apps": [{
  ... 
  "styles": [
      "styles.css",
      "../path/to/semantic.min.css" // 
  ],
  "scripts": [
      "../node_modules/jquery/dist/jquery.min.js",
      "../path/to/semantic.min.js"
  ],
  ...
}]
 
 

Use

Then you can use in a component as follows:

// Module
import { NgModule } from "@angular/core";
import { NgSemanticModule } from "ng-semantic";
 
@NgModule({
    bootstrap:    [ AppComponent ],
    declarations: [ AppComponent ],
    imports:      [ BrowserModule, NgSemanticModule ]
})
export class AppModule {}
 
// Component
import {Component} from '@angular/core';
 
@Component({
selector: 'demo-cmp',
template: `
 <sm-segment class="raised">
    Hello
 </sm-segment>
 `
})
export class DemoComponent {}

Development

git clone https://github.com/vladotesanovic/ngSemantic.git
cd ngSemantic
 
# install dependencies 
npm install && npm run typings
 
# compile demo project 
npm start

Components

  • sm-accordion
  • sm-button
  • sm-loader
  • sm-header
  • sm-message
  • sm-popup
  • sm-segment
  • sm-modal
  • sm-sidebar
  • sm-dimmer
  • sm-flag
  • sm-input
  • sm-checkbox
  • sm-rating
  • sm-dropdown
  • sm-select
  • sm-search
  • sm-textarea
  • sm-progress
  • sm-card
  • sm-shape
  • sm-tabs & sm-tab
  • sm-list
  • sm-item
  • smDirTooltip
  • smDeviceVisibility
  • smDirVisibility

Licence

MIT License

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.133latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.133
1.1.120

Package Sidebar

Install

npm i eng-ng-semantic

Weekly Downloads

3

Version

1.1.13

License

MIT

Last publish

Collaborators

  • silibdev
  • smartm0use