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

下载 Official Semantic UI bundle ( .zip ) from Semantic-Org

将 semantic.min.csssemantic.min.jsjquery添加到angular-cli.json 如下:

...

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

就可以使用了

// 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 {}
 

angular项目中使用ngSemantic的更多相关文章

  1. gulp 在 angular 项目中的使用

    gulp 在 angular 项目中的使用 keyword:gulp,angularjs,ng,ngAnnotate,jshint,gulpfile 最后附完整简洁的ng项目gulpfile.js 准 ...

  2. angular项目中各个文件的作用

    原文地址 https://www.jianshu.com/p/176ea79a7101 大纲 1.对angular项目中的一些文件的概述 2.对其中一些文件的详细描述 2.1.package.json ...

  3. Angular 项目中如何使用 ECharts

    在有些使用 ECharts 库的 Angular 项目中,通常除了安装 npm 包之外,还会在 angular.json 中配置 “build.options.scripts”,将 “node_mod ...

  4. angular项目中遇到的问题

    一.angular项目中如何实现路由缓存 需要实现的效果,对请求的数据进行缓存,比如进入文章详情页之后点击返回,不会再调用后台数据接口:而是加载缓存中的数据,如何数据变动的情况下,可使用下拉刷新刷新页 ...

  5. angular项目中使用Primeng

    1.第一步把依赖添加到项目中 npm install primeng --save npm install @angular/animations --save npm install font-aw ...

  6. Angular项目中引入jQuery

    npm install --save jquery npm install @types/jquery --save 在对应的组件中引入 import * as $ from "jquery ...

  7. 在angular项目中使用bootstrap的tooltip插件时,报错Property 'tooltip' does no t exist on type 'JQuery<HTMLElement>的解决方法和过程

    在angular4的项目中需要使用bootstrap的tooltip插件. 1. 使用命令安装jQuery和bootstrap npm install bootstrap jquery --save ...

  8. angular项目中使用jquery的问题

    1.使用npm命令往项目中添加jQuery. npm install jquery --save 2.在你想要用jQuery的组件中添加. import * as $ from "jquer ...

  9. Angular项目中共享模块的实现

    创建share Modele:ng g m share import进来所有需要共享的模块都export出去, 一.共享CommonModule 暂时只有CommonModule,以后会有一些需要共享 ...

随机推荐

  1. 洛谷 P2951 [USACO09OPEN]捉迷藏Hide and Seek

    题目戳 题目描述 Bessie is playing hide and seek (a game in which a number of players hide and a single play ...

  2. hive 一次性命令

    1.用hive查询,而不进入hive cli,查询后的值可以保存到文件中 #使用参数-e [hadoop@bigdata-senior01 ~]$ hive -e "select * fro ...

  3. windows 10上利用Microsoft RTF文件(CVE-2017-0199)进行攻击

    Microsoft Word下的恶意RTF文件容易被收到攻击,在本文中,我们使用python脚本对Microsoft Word 2013进行oday攻击演示,该脚本会生成恶意的.rtf文件,并提供目标 ...

  4. bzoj3036: 绿豆蛙的归宿(期望DP)

    刷水反被水题日,拓扑写炸WA了2发T T... 因为是DAG图,可以直接递推,不需要高斯消元 #include<iostream> #include<cstring> #inc ...

  5. SAS8.1安装步骤(附图)

    安装前应当把系统时间更改到一九九几年. 1.在解压后的文件夹里找到 setup .exe 双击 开始安装 2.单击SAS System Setup 3.点击Next 4.选择 complete 并单击 ...

  6. 斯皮尔曼等级相关(Spearman’s correlation coefficient for ranked data)

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...

  7. 让块元素在同一行显示的方法: float 和inline-block

    float: 定义:按照一个指定的方向移动,遇到父级的边界或者相邻的浮动元素就会停下来(不完全脱离文档流) 值: left.right.none 特点: 1.浮动的块元素可以在一行显示,宽度是被内容撑 ...

  8. oracle实用的sqlplus命令

    有时候难免没有工具,得自己手动输入sqlplus命令 执行SQL文件:@sql文件,例如:@/home/myuser/sql/test.sql查看数据库存在的存储过程:Select object_na ...

  9. Win7 32位安装Oracle11g R2 图解示例

    Win7 32位操作系统安装Oracle11g R2 图解示例.废话不说了,直接上图. 1.下载的两个oracle 11gR2压缩包解压到单独的文件夹中. 2.找到解压的database文件夹中的Se ...

  10. 2017北京国庆刷题Day1 morning

    期望得分:100+100+100=300 实际得分:100+100+70=270 T1位运算1(bit) Time Limit:1000ms   Memory Limit:128MB 题目描述 LYK ...