Coder Social home page Coder Social logo

beeman / angular-elements-chat-widget Goto Github PK

View Code? Open in Web Editor NEW
129.0 18.0 36.0 400 KB

๐Ÿ’ฌ Chat Widget built with Angular Elements

Home Page: https://angular-elements-chat-widget.now.sh/

License: MIT License

JavaScript 8.45% HTML 12.69% TypeScript 59.71% CSS 19.15%

angular-elements-chat-widget's Introduction

Chat Widget built with Angular Elements

Angular Elements allows you to create Custom Elements (from the WebComponents spec) from Angular Components.

This means that those components can be used outside of an Angular app!

Project Structure

The project is a standard Angular 10 project with a few additions:

src/app/element.module.ts   Module with the component to be used as Angular Element. Imported by App Module
src/main.element.ts         bootstrap the Element Module
src/polyfills.element.ts    polyfills for the Element Module
build-elements.js           script to generate the exported file and demo project

Development

The component can be developed as any other Angular component: run ng serve and navigate to http://localhost:4200/.

Build

The build configuration of the Angular Elements is defined in a separate project in angular.json.

You can run this configuration with npm run build:elements. It creates a build in dist/elements-build that only contains ElementModule.

After this build the ./build-elements.js script creates the final js file and demo project in dist/elements.

To change the target of the compiled js file to either es5 or es2015, update the "postbuild:elements" script in package.json. Default it creates an es2015 file.

angular-elements-chat-widget's People

Contributors

beeman avatar haroenv avatar julian-vp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-elements-chat-widget's Issues

Using the chat widget in an Angular project

When I try to add the script to .angular-cli, at the index.html or at main.ts there is an error

Uncaught TypeError: (intermediate value)(intermediate value).push is not a function at Object.eval (omega.js:1) at eval (omega.js:4) at Object../src/assets/scripts/omega.js (main.bundle.js:1206) at __webpack_require__ (inline.bundle.js:55) at eval (main.ts:8) at Object../src/main.ts (main.bundle.js:1222) at __webpack_require__ (inline.bundle.js:55) at Object.0 (main.bundle.js:1230) at __webpack_require__ (inline.bundle.js:55) at webpackJsonpCallback (inline.bundle.js:26)

coming from the first line of the compiled code
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(e,

any idea how to solve this? or how to use a custom element in an angular project?

Cannot import chatModule from node_modules

Hi,

We had a project where we used older version of the chat-widget. We used to generate a tgz file of chat-widget and use it as a custom plugin in our ionic project, we tried the same with the new build and we do get a chat-widget created in node_modules but we are unable to import it in our pages.
This is how we used it, but currently we are unable to import the ChatModule which is available in node_modules
import {ChatModule} from 'chat-widget' @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, ChatBotPageRoutingModule, ChatModule, HttpModule, RouterModule.forChild([]) ], declarations: [ChatBotPage] })

StaticInjectorError

chat-widget.js:3 ERROR Error: StaticInjectorError(e)[e -> e]:
StaticInjectorError(Platform: core)[e -> e]:
NullInjectorError: No provider for e!
at e.get (chat-widget.js:3)
at chat-widget.js:3
at e (chat-widget.js:3)
at e.get (chat-widget.js:3)
at chat-widget.js:3
at e (chat-widget.js:3)
at e.get (chat-widget.js:3)
at so (chat-widget.js:3)
at e.get (chat-widget.js:3)
at Go (chat-widget.js:3)

Collaborating on new issues

I would like to collaborate on the new issues and tasks. Is there any mailing list available for this project, like on slack or gitter etc. ?

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.