Giter Site home page Giter Site logo

cedric-song / ng2-admin-lte Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twanoo67/bootstraping-ngx-admin-lte

0.0 2.0 0.0 12.17 MB

Bootstraping of Angular2 with AdminLTE dashboard template (using angular2 final,router v3, angular-cli and ng2-bootstrap )

Shell 1.36% TypeScript 67.28% JavaScript 2.25% HTML 25.71% CSS 3.40%

ng2-admin-lte's Introduction

ng2-admin-lte

Join the chat at https://gitter.im/TwanoO67/ng2-admin-lte Build Status

Bootstraping of Angular2 with AdminLTE dashboard template

Preview

Launching with docker

./bin/start.sh

Building with docker

./bin/prod.sh

Lauching with node > 7 locally installed

npm install
npm start

Developpement

Adding a component

cd src/app/widgets/
npm run gen component my-new-widget

Ajouter une page

cd src/app/pages/
npm run gen component my-new-page

Ajouter un service

cd src/app/services/
npm run gen service my-new-service

Components from Ng2-bootstrap

For standard boostrap widget we are using ng2-bootstrap

You can find all widget and the doc here: http://valor-software.com/ng2-bootstrap/#/alerts

Specific Components

App Header

This widget handle the header bar, it includes other 'box' widgets for the top navigation:

  • Messages Box
  • Notification Box
  • Tasks Box
  • User box

Messages Box

This widget is registred to the messages service

Notification Box

WIP This widget is registred to the notification service

Tasks Box

WIP This widget is registred to the task service

User box

This widget is registred to the user service (for the current user display)

Menu Aside

This widget handle the left navigation Menu

It is registred to the user service (for the current user display)

Models

User

  • firstname: string, First Name of the user
  • lastname : string, Last Name of the user
  • email : string, Email address of the user
  • avatar_url : string, URL for the user avatar, could be absolute or relative
  • creation_date : string, timestamp of the creation of the user

Message

  • title : string, title of the message
  • content : string, content of the mesage
  • author : User, source user of the message
  • destination : User, destination user of the message
  • date : string, date of sending

Services

User service

This service is used to send/get the current user informations accross the app

For example you can set the current user :

import {User} from "../../models/user";
import {UserService} from "../../services/user.service";
...
constructor(
  private _user_serv: UserService
){
...
ngOnInit(){
  let user = new User({
    firstname: "WEBER",
    lastname: "Antoine",
    email: "[email protected]",
    avatar_url: "assets/img/user2-160x160.jpg"
  });
  this._user_serv.setCurrentUser( user );

and you can get the user in a widget:

import {User} from "../../models/user";
import {UserService} from "../../services/user.service";
...
private current_user: User;
constructor(
  private _user_serv : UserService,
){
  //se connecter au modification du user courant
  this._user_serv.current_user.subscribe((user: User) => this.current_user = user);

warning, the import path are relative to the component you're writing in ...

Support

Hey dude! Help me out for a couple of ๐Ÿป!

Beerpay Beerpay

ng2-admin-lte's People

Contributors

twanoo67 avatar alexsorkin avatar rodesv avatar cindoum avatar avatsaev avatar fabriceclementz avatar mbateman66 avatar boskiv avatar gitter-badger avatar komputindo avatar

Watchers

James Cloos avatar Cedric Song avatar

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.