Giter Site home page Giter Site logo

Comments (2)

lishewen avatar lishewen commented on June 2, 2024

重现步骤:

  1. Install global angular-cli:
npm install -g @angular/cli
  1. New a empty angular project
# Specify less style
ng new demo --style less
cd demo
  1. add ngx-weui
ng add ngx-weui@next
  1. edit app.component.html
<div style="text-align:center; padding: 8px;">
  <h1>
    ngx-weui
  </h1>
  <p>
    ngx-weui 是 WeUI 的 Angular 版本,
    WeUI
    是一套同微信原生视觉体验一致的基础样式库,由微信官方设计团队为微信内网页和微信小程序量身设计,令用户的使用感知更加统一。
  </p>
  <p>
  </p>
  <div style="margin-top: 16px;">
    <button weui-button (click)="okClick()">Button</button>
  </div>
</div>
  1. edit app.component.ts
import { Component } from '@angular/core';
import { ToptipsService } from 'ngx-weui';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent {
  title = 'demo';
  constructor(private srv: ToptipsService) { }
  okClick() {
    this.srv['warn']('demo');
  }
}

from ngx-weui.

cipchk avatar cipchk commented on June 2, 2024

临时解决办法在根模块中注册:

  providers: [ToptipsService],

from ngx-weui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.