angular项目中使用ngSemantic
- npm install ng-semantic --save
- npm install jquery --save
下载 Official Semantic UI bundle ( .zip ) from Semantic-Org
将 semantic.min.css
, semantic.min.js
, jquery添加到
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的更多相关文章
- gulp 在 angular 项目中的使用
gulp 在 angular 项目中的使用 keyword:gulp,angularjs,ng,ngAnnotate,jshint,gulpfile 最后附完整简洁的ng项目gulpfile.js 准 ...
- angular项目中各个文件的作用
原文地址 https://www.jianshu.com/p/176ea79a7101 大纲 1.对angular项目中的一些文件的概述 2.对其中一些文件的详细描述 2.1.package.json ...
- Angular 项目中如何使用 ECharts
在有些使用 ECharts 库的 Angular 项目中,通常除了安装 npm 包之外,还会在 angular.json 中配置 “build.options.scripts”,将 “node_mod ...
- angular项目中遇到的问题
一.angular项目中如何实现路由缓存 需要实现的效果,对请求的数据进行缓存,比如进入文章详情页之后点击返回,不会再调用后台数据接口:而是加载缓存中的数据,如何数据变动的情况下,可使用下拉刷新刷新页 ...
- angular项目中使用Primeng
1.第一步把依赖添加到项目中 npm install primeng --save npm install @angular/animations --save npm install font-aw ...
- Angular项目中引入jQuery
npm install --save jquery npm install @types/jquery --save 在对应的组件中引入 import * as $ from "jquery ...
- 在angular项目中使用bootstrap的tooltip插件时,报错Property 'tooltip' does no t exist on type 'JQuery<HTMLElement>的解决方法和过程
在angular4的项目中需要使用bootstrap的tooltip插件. 1. 使用命令安装jQuery和bootstrap npm install bootstrap jquery --save ...
- angular项目中使用jquery的问题
1.使用npm命令往项目中添加jQuery. npm install jquery --save 2.在你想要用jQuery的组件中添加. import * as $ from "jquer ...
- Angular项目中共享模块的实现
创建share Modele:ng g m share import进来所有需要共享的模块都export出去, 一.共享CommonModule 暂时只有CommonModule,以后会有一些需要共享 ...
随机推荐
- 迁移数据到历史表SQL(转)
有时工作需要需要把当前表的数据,移到历史表中,而历史表基本是以时间(年)为后缀来命名历史表的,如 A_2011,A_2012,在移数据时,要按数据的时间,移到不同的表中,且由于如果数据有同步.一次处理 ...
- 基于jwt的token验证
一.什么是JWT Json web token (JWT), 是为了在网络应用环境间传递声明而执行的一种基于JSON的开放标准((RFC 7519). 该token被设计为紧凑且安全的,特别适用于分布 ...
- python基础---- __getattribute__----__str__,__repr__,__format__----__doc__----__module__和__class__
目录: 一. __getattribute__ 二.__str__,__repr__,__format__ 三.__doc__ 四.__module__和__class__ 一. __getattri ...
- 虚拟机安装ubuntu14.04.5系统
参考教程 在vitualbox安装 ubuntu14.04.2 LTS教程 http://jingyan.baidu.com/article/46650658228345f549e5f8cc.html ...
- php输出控制函数存在的意义
因为http协议的限制(前几行必须是协议信息,然后一个空行,然后才是用户需要的内容), 需要保证header信息在其他内容之前发送,否则浏览器无法解析服务器返回的内容.
- STL源码分析-string
http://note.youdao.com/noteshare?id=c9b53b7d3379939aae7c05d1ea141a42
- hihocoder #1584 : Bounce
题意; 有一个n*m的网格阵,球从左上角开始在网格中碰撞,碰到边界就直角反弹,到达格子的角落结束,求途中经过一次的格子数. 代码: //神马规律啊,设x表示球与垂直面的撞击次数,y为球与水平墙面的撞击 ...
- $('.goods_tag_ids_all')[0].checked = true;//~~~~~ 单条改变checkbox 属性样式
//点击左边全选选中时,都全选$('.goods_tag_ids_all').on('click',function(){ if($('.goods_tag_ids_all').is(':checke ...
- 第5章-Vue.js交互及生命周期练习
一.学习目标 使用网络请求进行前后端交互 (重点) 理解钩子函数的作用 (难点) 掌握Vue.js过滤器的使用方法 了解Vue.js事件的深入用法 (重点) 二.仿写留言板 2.1.实现" ...
- java格式化字符串,在指定位置插入指定字符串,兼容中英文以及特殊字符,例如:换行,用于解决生成pdf换行问题等问题
本博客是自己在学习和工作途中的积累与总结,仅供自己参考,也欢迎大家转载,转载时请注明出处. http://www.cnblogs.com/king-xg/p/6370890.html 如果觉得对您有 ...