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. Django字段类型介绍

    一,通过makemigrations,migrate来修改数据, 1.Django的ORM支持修改表结构,修改完以后,执行 python manage.py makemigrations  pytho ...

  2. 3.5 面向连接的运输:TCP

    3.5  面向连接的运输:TCP 3.5.1 TCP连接 TCP进行传输之间要进行三次握手建立连接,这个连接不是物理意义上的有一根电线连接,而是应用端两个应用,在逻辑上是已经建立连接了. TCP 不需 ...

  3. bzoj2969 矩形粉刷 概率期望

    此题在bzoj是权限题,,,所以放另一个oj的链接 题解: 因为期望线性可加,所以可以对每个方格单独考虑贡献.每个方格的贡献就为至少被粉刷过一次的概率×1(每个格子的最大贡献就是1...)每个方格至少 ...

  4. 【Treeview】遍历本地磁盘

    一.前言 Treeview控件常用于遍历本地文件信息,通常与Datagridview与ImageList搭配.ImageList控件用于提供小图片给TreeView控件,DatagridView通常显 ...

  5. MapReduce(五) mapreduce的shuffle机制 与 Yarn

    一.shuffle机制 1.概述 (1)MapReduce 中, map 阶段处理的数据如何传递给 reduce 阶段,是 MapReduce 框架中最关键的一个流程,这个流程就叫 Shuffle:( ...

  6. bzoj4165: 矩阵(堆+hash)

    求第k大用堆维护最值并出堆的时候扩展的经典题... 因为只有正数,所以一个矩阵的权值肯定比它的任意子矩阵的权值大,那么一开始把所有满足条件的最小矩阵加进堆里,弹出的时候上下左右扩展一行加进堆,用has ...

  7. 专题训练之LCA

    推荐几个博客:https://www.cnblogs.com/JVxie/p/4854719.html Tarjan离线算法的基本思路及其算法实现 https://blog.csdn.net/shah ...

  8. tp between

    $a = array( 'time' => array('between',[c,d]) ); c<= time <= d

  9. selectors

    一.Selectors模块 它具有根据平台选出最佳的IO多路机制,比如在win的系统上他默认的是select模式而在linux上它默认的epoll,建议使用selectors. 常用共分为三种:sel ...

  10. 装饰器--decorator1

    装饰器 一.定义 1.装饰器:本质是函数 2.功能:用来装饰其他函数,为其他函数添加附加功能 二.原则 1.不能修改被装饰函数的源代码 2.不能修改被装饰函数的调用方式 三.实现装饰器 1.函数 即 ...