Angular CLI with jQWidgets

In this tutorial, we will show you how to use https://cli.angular.io/ along with the Angular Components by jQWidgets.
Please, follow the step by step instructions below:

  • npm install -g angular-cli
  • ng new myProject
  • cd myProject
  • npm install jqwidgets-framework --save
  • ng serve
  • Edit src/index.html:
    <!doctype html>
    <html>

    <head>

    <meta charset="utf-8">

    <title>Jqwidgets</title>

    <base href="/">

    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link rel="icon" type="image/x-icon" href="favicon.ico">

    <!-- Styles -->

    <link rel="stylesheet" href="http://www.jqwidgets.com/public/jqwidgets/styles/jqx.base.css" type="text/css" />

    <!-- jQWidgets -->

    <script src="http://www.jqwidgets.com/public/jqwidgets/jqxcore.js"></script>

    <script src="http://www.jqwidgets.com/public/jqwidgets/jqxdraw.js"></script>

    <script src="http://www.jqwidgets.com/public/jqwidgets/jqxbargauge.js"></script>

    </head>

    <body>

    <app-root>Loading...</app-root>

    </body>

    </html>

     
  • Edit src/app.component.ts:
    import { Component } from '@angular/core';
    import { jqxBarGaugeComponent } from 'jqwidgets-framework/jqwidgets-ts/angular_jqxbargauge';

    @Component({

    selector: 'app-root',

    templateUrl: './app.component.html',

    styleUrls: ['./app.component.css']

    })

    export class AppComponent {

    values: number[] = [102, 115, 130, 137];

    }

     
  • Edit src/app.component.html:
    <jqxBarGauge
    [width]="600" [height]="600" [colorScheme]="'scheme02'"

    [max]="150" [values]="values">

    </jqxBarGauge>

     
  • Edit src/app.module.ts:
    import { BrowserModule } from '@angular/platform-browser';
    import { NgModule } from '@angular/core';

    import { FormsModule } from '@angular/forms';

    import { HttpModule } from '@angular/http';

    import { AppComponent } from './app.component';

    import { jqxBarGaugeComponent } from 'jqwidgets-framework/jqwidgets-ts/angular_jqxbargauge';

    @NgModule({

    declarations: [

    AppComponent,

    jqxBarGaugeComponent

    ],

    imports: [

    BrowserModule,

    FormsModule,

    HttpModule

    ],

    providers: [],

    bootstrap: [AppComponent]

    })

    export class AppModule { }

     
  • Navigate to http://localhost:4200/ in your web browser
  • Result:

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

  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. OEM SLP Key

    OEM SLP Key Windows Server 2012 R2 Datacenter ===================== 2N9T6-Y284D-T68G9-QGV6X-FRFTD -- ...

  2. [NOI2011]兔兔与蛋蛋游戏 二分图博弈

    题面 题面 题解 通过观察,我们可以发现如下性质: 可以看做是2个人在不断移动空格,只是2个人能移动的边不同 一个位置不会被重复经过 : 根据题目要求,因为是按黑白轮流走,所以不可能重复经过一个点,不 ...

  3. Android 通过浏览器打开应用

    在很多应用的web站,其实都有这样一个功能,就是直接在网页中打开应用,接下来的就来探讨一下这个功能的实现,有些地方也我还没弄明白,还请懂的大神指点. 首先,得说一点不好消息,在微信中,这样的方式是行不 ...

  4. python基础----多态与多态性、super函数用法、继承原理

    一.多态与多态性                                                                        ㈠多态: 多态指的是一类事物有多种形态, ...

  5. EXT 翻页后查询 页数不重置

    测试查询条件时,当表格翻页后,输入查询条件,页数不刷新,还是之前的页数,导致列表不显示数据.只要在查询时,将表格的currentPage 设为1 即可. store.currentPage = 1; ...

  6. eclipse show view失效的解决办法

    今天打开eclipse,发现console窗口没有了,然后使用show view也无法打开,上网查找办法,找到了方法试了一下,窗口重置(Windows-->Perspective-->Re ...

  7. activiti学习-用户与用户组

    activiti学习笔记3-用户与用户组 2015年05月07日 14:43:06 cq1982 阅读数:4142更多 个人分类: activiti工作流引擎   (本博客都是纯文本手工代码,错误难免 ...

  8. “玲珑杯”ACM比赛 Round #18 A 前缀预处理 D dp

    DESCRIPTION 今天HHHH 考完了期末考试,他在教学楼里闲逛,他看着教学楼里一间间的教室,于是开始思考: 如果从一个坐标为 (x1,y1,z1)(x1,y1,z1) 的教室走到(x2,y2, ...

  9. tomcat8 的 websocket 支持

    使用 tomcat8 开发 WebSocket 服务端非常简单,大致有如下两种方式. 1.使用注解方式开发,被 @ServerEndpoint 修饰的 Java 类即可作为 WebSocket 服务端 ...

  10. 《转》sklearn参数优化方法

    sklearn参数优化方法  http://www.cnblogs.com/nolonely/p/7007961.html   学习器模型中一般有两个参数:一类参数可以从数据中学习估计得到,还有一类参 ...