• Stars
    star
    146
  • Rank 252,769 (Top 5 %)
  • Language
    CSS
  • Created almost 10 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple AngularJS Chat Directive with Bootstrap

<irontec-simple-chat>

An AngularJS+Bootstrap Simple Chat Directive

AngularJS Chat

Usage

Requirements

"dependencies": {
  "angularjs": "~1.3.8",
  "bootstrap": "~3.3.1",
  "angularjs-scroll-glue": "~0.0.1"
}

Installation

Install with Bower

bower install --save angular-bootstrap-simple-chat

Add the dependencies to your index.html

<!-- Dependencies -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<script src="bower_components/angularjs/angular.js"></script>

<!-- Simple Chat -->
<link rel="stylesheet" href="bower_components/angular-bootstrap-simple-chat/src/css/style.css">
<script src="bower_components/angular-bootstrap-simple-chat/src/scripts/index.js"></script>

Load the module in your app

angular.module('app', ['irontec.simpleChat']);

Using

/** VIEW **/
<irontec-simple-chat
  messages="vm.messages"
  username="vm.username"
  input-placeholder-text="You can write here"
  submit-button-text="Send your message"
  title="Super Awesome Chat"
  theme="material"
  submit-function="vm.sendMessage"
  visible="vm.visible"
  expand-on-new="vm.expandOnNew">
</irontec-simple-chat>
/** CONTROLLER **/
angular.module('app').controller('Shell', Shell);

function Shell() {

  var vm = this;

  vm.messages = [
    {
      'username': 'username1',
      'content': 'Hi!'
    },
    {
      'username': 'username2',
      'content': 'Hello!'
    },
    {
      'username': 'username2',
      'content': 'Hello!'
    },
    {
      'username': 'username2',
      'content': 'Hello!'
    },
    {
      'username': 'username2',
      'content': 'Hello!'
    },
    {
      'username': 'username2',
      'content': 'Hello!'
    }
  ];

  vm.username = 'username1';

  vm.sendMessage = function(message, username) {
    if(message && message !== '' && username) {
      vm.messages.push({
        'username': username,
        'content': message
      });
    }
  };
  vm.visible = true;
  vm.expandOnNew = true;
}

Documentation

Params

  • messages: array of messages to show. Message Format: {username: 'username', content: 'My message'}
  • username: username of the user using the app
  • input-placeholder-text: String, text in the input placeholder
  • title: String, text in the chat top title
  • theme: String, theme used for the chat
  • submit-function: Function in the controller to be launched on the new message submit. It receives two params: message & username
  • visible: Boolean, controls visibility on the page (required)

Using themes

  • First, add the themes stylesheet to your index.html
<link rel="stylesheet" href="bower_components/angular-bootstrap-simple-chat/src/css/themes.css">
  • Define the theme you will use with the theme property
  • List of themes:
    • irontec
    • material

More Repositories

1

sngrep

Ncurses SIP Messages flow viewer
C
1,010
star
2

android-kotlin-samples

Some basic samples of Kotlin for Android
Kotlin
309
star
3

ivozprovider

IVOZ Provider - Multitenant solution for VoIP telephony providers
PHP
193
star
4

android-room-example

Android Kotlin app showcasing the Room persistence library
Kotlin
46
star
5

itsbc

Irontec Tiny SBC. OpenSIPS & RTPEngine based micro SBC with Web Administration
PHP
36
star
6

bbs

Black Box SIP Tester
Python
31
star
7

netfilter-nfqueue-samples

Very short C sample code using libnfqueue, firewalling on user space
C
31
star
8

android-mvvm-example

Android MVVM pattern example app
Kotlin
26
star
9

suite-crm-click-to-call

SuiteCRM Click to Call (Asterisk)
PHP
20
star
10

node-mouse

handle mouse events from /dev/input/[mouse[0-9]+|mice] for nodejs
JavaScript
18
star
11

ledturner

turn on / off keyboard leds based on /dev/input/event*
C
10
star
12

Cocos2dx-native-integration

Integration scafold between Android native app and Cocos2D-x engine.
C
10
star
13

ibeacons-simple-tools

iBeacon + LE scan from your terminal
Shell
9
star
14

klearMatrix

Zend Framework 1 main CRUD module for Klear Universe
JavaScript
7
star
15

slides-ionic

La presentaci贸n utilizada en el taller pr谩ctico de Ionic.
HTML
7
star
16

isaac

IvozNG Simplified Asterisk AMI Connector
C
6
star
17

ironic-starter

Ionic Starter by irontec
JavaScript
6
star
18

klear

Zend Framework 1 main base module for Klear Universe
CSS
6
star
19

klear-library

Zend Framework 1 external external library for public sites (Klear based sites)
PHP
6
star
20

_404

Our 404 contest winner!
JavaScript
6
star
21

rxweather-android

Android weather forecast app made with RxAndroid, Retrofit and data binding
Kotlin
6
star
22

telebot3000

testing oriented JsSIP based softphone
TypeScript
5
star
23

ionic-starter-wpion

Generator for WordPress based Mobile Applications running on top of Ionic.
HTML
5
star
24

ivoz-ui

UI library used in ivozprovider
TypeScript
5
star
25

LibreCon-app

LibreCon App: iOS / Android / Api / Klear
PHP
4
star
26

ghostphone

JsSip Angular-Material Softphone
JavaScript
4
star
27

node-asterisk-amqp

Node.js wrapper around asterisk amqp connection layer
JavaScript
4
star
28

Auskalo

Android OS & iOS Cross-platform app based on Cocos2d-x. Auskalo, Euskara ikasi edo hobetzeko modu berri eta desberdin bat da.
C++
4
star
29

push-notifications

Libreria para gestionar facilmente las notificaci贸nes push con Android e IOS.
PHP
3
star
30

slides-typescript

Introducci贸n a typescript
JavaScript
3
star
31

klear-generator

ORM for klear universes (Zend Framework 1 based)
PHP
3
star
32

ivoz-core

Core library for ivozprovider
PHP
3
star
33

klearGallery

Image Management picker for klearMatrix
PHP
3
star
34

TDDIntro

Pr谩ctica para post sobre Test Driven Development
PHP
3
star
35

zsugar

Zimbra SugarCRM integration zimlet (unmaintained, see README)
JavaScript
3
star
36

elastika

Command line utility to extract data with Apache Tika and send them over to Elasticseach
Java
3
star
37

curso-css-avanzado

CoffeeScript
2
star
38

klear-full

Documentaci贸n de Klear
2
star
39

reveal-irontec-theme

Tema corporativo de Irontec para RevealJS
CSS
2
star
40

educaedu

Pr谩ctica curso educaedu
PHP
2
star
41

asterisk-sounds

IvozProvider asterisk multilanguage sounds in alaw and g729
Roff
2
star
42

asterisk-patches

asterisk patches by Irontec
2
star
43

generator-ngbabel

Generator for AngularJS projects with ES6 Features
JavaScript
2
star
44

slides-restfull

CSS
2
star
45

klear-starter

klear-starter
PHP
2
star
46

curso-grunt-bower-yeoman

CSS
2
star
47

anvil

Irontec mobile development system
JavaScript
2
star
48

open-ispilua

JavaScript
2
star
49

klear-tutorial

CSS
2
star
50

typescript-generator-bundle

Bundle to generate TypeScript elements based on a Symfony project
PHP
2
star
51

zmantis

Zimbra Mantis integration zimlet
JavaScript
2
star
52

json-exception-response-bundle

Treat exceptions in JSON
PHP
2
star
53

generator-wpion

Generator for WordPress based Mobile Applications
JavaScript
1
star
54

app-curso-ionic

JavaScript
1
star
55

BandaBeat

BandaBeat
1
star
56

node-isaac

Node.js Isaac connection wrapper
HTML
1
star
57

klear-vagrant

Shell
1
star
58

anvil-angular

JavaScript
1
star
59

InkSlider

Kotlin
1
star
60

ivoz-dev-tools

DevTools used in ivozprovider
PHP
1
star
61

slides-escalabilidad

Slides / Curso escalabilidad y buenas pr谩cticas en Symfony 2
CSS
1
star
62

InkBasicModels

Library to make easier to modify view parameters and make "programmatic styles".
Kotlin
1
star
63

slides-android-beacon

Slides Android+Beacons @EuskalEncounter23
HTML
1
star
64

Ikasesteka

iOS and Android cross-platform game based on Cocos2d-x v3.4. Umeek bere lehenengo urratsak euskaraz eman ditzaten aplikazio mugikorra.
C++
1
star
65

slides-git

Transparencias curso Git: https://irontec.github.io/slides-git/#/
HTML
1
star
66

app-taller-ionic

El c贸digo de la aplicaci贸n desarrollada durante el taller de Ionic Framework
JavaScript
1
star
67

InkSpannable

Better spannable creation.
Kotlin
1
star
68

Mintzatu

Euskeraz Mintzatzen diren tokien sarea
PHP
1
star
69

curso-angularjs

Curso AngularJS
JavaScript
1
star
70

ivoz-api

API library used in ivozprovider
PHP
1
star
71

curso-angularjs-basico

Diapositivas del curso AngularJS
HTML
1
star
72

euskal-beacons

App Android para trabajar con Beacons durante la charla en la Euskal Encounter 2015
Java
1
star
73

slides-pfsense

Transparencias curso pfSense: https://irontec.github.io/slides-pfsense
JavaScript
1
star
74

ivoz-lib-demo

Demo portal using ivoz-core, ivoz-api and ivoz-ui
PHP
1
star
75

Ikasitz

Android OS & iOS Cross-platform app based on Cocos2d-x. Zure seme-alabei euskararen oinarrizko hiztegia ikasten lagundu nahi badiezu, Ikasitz jokoarekin lortu dezakezu.
C++
1
star