angular中使用AMEXIO

1.用NPM添加依赖到项目中,amexio需要先添加以下四个依赖到项目

npm install [email protected]  --save

npm install [email protected] --save

npm install [email protected]^1.4.0 --save

npm install [email protected] --save

2.安装amexio到项目中

For Bootstrap 4

npm install [email protected] --save

For Bootstrap 3

npm install [email protected] --save

3.Include these in your app‘s .angular-cli.json

"styles": [  "styles.css",  "../node_modules/bootstrap/dist/css/bootstrap.min.css",  "../node_modules/font-awesome/css/font-awesome.css",  "../node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css",  "../node_modules/bootstrap-timepicker/css/bootstrap-timepicker.min.css"],"scripts": ["../node_modules/jquery/dist/jquery.min.js","../node_modules/tether/dist/js/tether.min.js","../node_modules/popper.js/dist/umd/popper.js","../node_modules/bootstrap/dist/js/bootstrap.min.js","../node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js","../node_modules/bootstrap-timepicker/js/bootstrap-timepicker.min.js"
],

4.

and then from your Angular AppModule:

import { BrowserModule } from ‘@angular/platform-browser‘;
import { NgModule } from ‘@angular/core‘;
import {FormsModule} from "@angular/forms";
import { AppComponent } from ‘./app.component‘;

// Import your library
import { AmexioWidgetModule,CommonHttpService } from ‘amexio-ng-extensions‘;

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    AmexioWidgetModule
  ],
  providers: [CommonHttpService],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its components, directives and pipes in your Angular application:

<!-- You can now use your library component in app.component.html -->
<amexio-text-input></amexio-text-input>

Amexio Charts

Amexio Charts is provided as a seperate Module as AmexioChartModule available under amexio-ng-extensions/charts To begin please add the module to your Component‘s Module

import { BrowserModule } from ‘@angular/platform-browser‘;
import { NgModule } from ‘@angular/core‘;
import {FormsModule} from "@angular/forms";
import { AppComponent } from ‘./app.component‘;

// Import your library
import { AmexioChartModule } from ‘amexio-ng-extensions/charts‘;

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    AmexioChartModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once Amexio Charting library is imported, you could use it ,

<!-- You can now use your library component in app.component.html -->
<amexio-chart-column [data]="employeeData"></amexio-chart-column>

More On Charts here : Charts Docs

Amexio Dashboard

Amexio Dashboard is provided as a seperate Module as AmexioDashboard available under amexio-ng-extensions/dashboard To begin please add the module to your Component‘s Module

import { BrowserModule } from ‘@angular/platform-browser‘;
import { NgModule } from ‘@angular/core‘;
import {FormsModule} from "@angular/forms";
import { AppComponent } from ‘./app.component‘;

// Import your library
import { AmexioDashboardModule } from ‘amexio-ng-extensions/dashboard‘;

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    AmexioDashboardModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once Amexio Dashboard library is imported, you could use it ,

<!-- You can now use your library component in app.component.html -->
<amexio-dashboard-gauge [data]="systemMetrics"></amexio-dashboard-gauge>

More on Dashboard Module : Dashboard Docs

Amexio Maps

Amexio Maps is provided as a seperate Module as AmexioMapsModule available under amexio-ng-extensions/mapsTo begin please add the module to your Component‘s Module

import { BrowserModule } from ‘@angular/platform-browser‘;
import { NgModule } from ‘@angular/core‘;
import {FormsModule} from "@angular/forms";
import { AppComponent } from ‘./app.component‘;

// Import your library
import { AmexioMapsModule } from ‘amexio-ng-extensions/dashboard‘;

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    AmexioMapsModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once Amexio Maps library is imported, you could use it ,

<!-- You can now use your library component in app.component.html -->
<amexio-map-geo-chart [data]="population"></amexio-map-geo-chart>
时间: 2024-08-09 02:21:00

angular中使用AMEXIO的相关文章

(七)理解angular中的module和injector,即依赖注入

依赖注入(DI)的好处不再赘言,使用过spring框架的都知道.angularjs作为前台js框架,也提供了对DI的支持,这是javascript/jquery不具备的特性.angularjs中与DI相关有angular.module().angular.injector(). $injector.$provide.对于一个DI容器来说,必须具备3个要素:服务的注册.依赖关系的声明.对象的获取.比如spring中,服务的注册是通过xml配置文件的<bean>标签或是注解@Repository.

angular中的通信方式

在项目中,我们可能会很经常性的利用到控制器之间的相互通信,在angular中的控制器之间的相互通信有以下几种方式: 1)通过本地数据的存储localstorage,sessionstorage, 2)通过rootScope,顶级作用域 3)通过$broadcast,$on,$emit的方式进行通信 在此就讲解下如何通过第三种方式进行通信的问题: $broadcast:顾名思义是广播的意思,一般用于父级控制器向子控制器传递信息的方法. $emit:主要是用于子控制器向父控制器传递信息的方法. $o

angular中的路径问题

我们在写项目时会遇到启动页调到引导页,引导页再调到首页, 那我们在用angular框架写这种东西的时候如果我们不细心的话就会遇到问题, 比如说找不到引导页的图片等等. 那我们怎么解决这个问题呢? 首先我们要明确,我们使用的angular框架所以我们应该使用angular中的框架来解决这个问题, 而不是还是按照原来的思想按部就班的使用路径跳转. 下面我们就来看一下, 1.启动页跳到引导页 app.controller("zeroController",function ($timeout

Angular中的jsonp

1.一般我们使用Angualr中的jsonp值这样使用的:注入$http服务 这样使用jsonp的方式可以支持多数api,但是douban不支持无法使用 1 module.controller('InTheatersController',['$scope','$http', function($scope,$http){ 2 4 var doubanApiAddress = 'https://api.douban.com/v2/movie/in_theaters'; 5 6 /!*在angua

angular中自定义依赖注入的方法和decorator修饰

自定义依赖注入的方法 1.factory('name',function () { return function(){ } }); 2.provider('name',function(){ this.$get=function(){ return function(){ } }; }); 3.service('name',function(){ this.n=v; }); 4.constant('name','value'); 5value('name','value'); 依赖的继承  

angular中的动画效果

用angular来形成动画效果的代码如下 <!DOCTYPE html> <html lang="en" ng-app="app"> <head> <meta charset="UTF-8"> <title></title> <style> .box { width: 100px; height: 100px; background: red; } </st

利用IdentityServer3在ASP.NET 5和Angular中实现OAuth2 Implicit Flow

(此文章同时发表在本人微信公众号"dotNET每日精华文章",欢迎右边二维码来关注.) 题记:之前介绍过的IdentityServer3虽然是基于Katana开发的,不过同样可以托管在ASP.NET 5中运行.今天推荐的这篇文章就是介绍如何在ASP.NET 5和Angular中实现OAuth2的Implicit Flow验证的. IdentityServer之前介绍过,是一个功能完备的.NET开源OpenID Connect/OAuth 2.0框架.IdentityServer3是基于

Angular 中得 scope 作用域梳理

$scope 的使用贯穿整个 Angular App 应用,它与数据模型相关联,同时也是表达式执行的上下文.有了 $scope 就在视图和控制器之间建立了一个通道,基于作用域视图在修改数据时会立刻更新 $scope,同样的 $scope 发生改变时也会立刻重新渲染视图. 有了 $scope 这样一个桥梁,应用的业务代码可以都在 controller 中,而数据都存放在controller 的 $scope 中. $rootScope Angular 应用启动并生成视图时,会将根 ng-app 元

在angular中使用swiper插件轮播无效的原因

我在angular中使用swiper插件时总会出现轮播不运行. 做项目么,肯定会使用路由实现切换的效果,我在做项目时总喜欢先把内容渲染在主页面上,当所要实现的效果都实现时,然后再把数据拿出来放在子页面上,通俗的讲就是把他放在另一个页面上,通过路由去获取信息. 1.在用路由中实现时一定要在路由里加上控制器controller 1 app.config(function ($routeProvider) { 2 $routeProvider.when('/index', { 3 templateUr