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:

最新文章

  1. ubuntu下非root用户下获得使用wireshark的权限
  2. 关于ARC下需要dealloc的相关内容
  3. Java 清除数组相同元素
  4. AJAX + WebService 实现文件上传
  5. OD使用教程12
  6. 2016&quot;百度之星&quot; - 初赛(Astar Round2A)All X(数学 矩阵)
  7. 14 Using Indexes and Clusters
  8. [原创作品]一个实用的js倒计时器 postby:zhutty.cnblogs.com
  9. 查询EBS在线用户SQL(R12)
  10. java之Thread.sleep(long)与object.wait()/object.wait(long)的区别(转)
  11. mybatis 的简单使用
  12. JAVA_读取XML文件
  13. js创建数组
  14. ZoomIt: 非PPT演示必备辅助软件
  15. T-SQL:qualify和window 使用(十七)
  16. RocketMQ事务消息-demo
  17. Linux中断(interrupt)子系统之五:软件中断(softIRQ)
  18. Oracle列自增实现(2)-Identity Columns in Oracle Database 12c Release 1 (12.1)
  19. 自己动手实现一个WEB服务器
  20. C# 获取config文件的值

热门文章

  1. Cisco Smart Install远程命令执行漏洞
  2. bzoj4144【AMPPZ2014】Petrol
  3. 扶苏的bitset浅谈
  4. 图像BMP格式介绍
  5. mysql 查看服务器正在运行的进程
  6. 多线程中join方法的含义
  7. 中南多校对抗赛 第三场 E
  8. 怎么用spring cloud service-id 进行调用接口
  9. HDU 4352 数位dp
  10. 手脱nSPack 1.3