All Projects → fabiomirandaa → boilerplate-angular-es6-webpack2

fabiomirandaa / boilerplate-angular-es6-webpack2

Licence: other
Boilerplate angular 1.x with ES6 and Webpack 2

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to boilerplate-angular-es6-webpack2

Angularjs Typescript Webpack
AngularJS 1.7, typescript 3 and webpack 4 starter project based on angular tutorial
Stars: ✭ 150 (+837.5%)
Mutual labels:  angularjs, webpack2
chakram
Generic Web App for GDG Events
Stars: ✭ 39 (+143.75%)
Mutual labels:  angularjs
angularjs-jest-example
✅ AngularJs with Jest example
Stars: ✭ 13 (-18.75%)
Mutual labels:  angularjs
angular-minimum-webpack-example
A bare minimum Angular setup with webpack.
Stars: ✭ 10 (-37.5%)
Mutual labels:  webpack2
Angular4-seed
Angular 4 Seed for Angular Forms
Stars: ✭ 37 (+131.25%)
Mutual labels:  angularjs
rentnride
Rent&Ride is an open source for Car Rental script. Travel to any of your favourite places by availing the services in the Rent & Ride application. Book cars for rental by making use of the flexibility to choose the car of your interest.
Stars: ✭ 37 (+131.25%)
Mutual labels:  angularjs
percy-node
Utilities for visual regression testing in node based testing setups (like Protractor) for use with percy.io
Stars: ✭ 17 (+6.25%)
Mutual labels:  angularjs
vue-contacts
通讯录web版,实现的功能有联系人的增删查改,联系人的分组,联系人信息的导入导出
Stars: ✭ 16 (+0%)
Mutual labels:  webpack2
shopnx
Ready to use AngularJS Shopping Cart with all features
Stars: ✭ 71 (+343.75%)
Mutual labels:  angularjs
single-page-react-h5
基于React框架的单页活动框架,可以基于此代码上进行相关的H5活动等相关内容的开发
Stars: ✭ 23 (+43.75%)
Mutual labels:  webpack2
react-starter
Starter kit for React.
Stars: ✭ 16 (+0%)
Mutual labels:  webpack2
chord-transitions
Transitioning Chord Diagram Demo with Angular/D3
Stars: ✭ 38 (+137.5%)
Mutual labels:  angularjs
phosphor-webui
Web-based user interface for managing OpenBMC systems
Stars: ✭ 37 (+131.25%)
Mutual labels:  angularjs
ADM-treeView
Pure AngularJs TreeView
Stars: ✭ 30 (+87.5%)
Mutual labels:  angularjs
react.js
A boilerplate for react js project. 基于 reactjs+redux+webpack2 的单页应用项目模板。
Stars: ✭ 28 (+75%)
Mutual labels:  webpack2
angular-heremaps
AngularJS directive for working with Here Maps
Stars: ✭ 19 (+18.75%)
Mutual labels:  angularjs
react-starter-kit
🚀 React starter kit for a modern single page (SPA) application (dependencies updated at 28 July 2017). Zero configuration. Ready to go. Just paste your code!
Stars: ✭ 26 (+62.5%)
Mutual labels:  webpack2
angular-odoo
Call Odoo webservices from AngularJS
Stars: ✭ 41 (+156.25%)
Mutual labels:  angularjs
boomerang
Easy website for your GDG Chapter
Stars: ✭ 74 (+362.5%)
Mutual labels:  angularjs
krakendesigner
KrakenD configuration editor.
Stars: ✭ 80 (+400%)
Mutual labels:  angularjs

boilerplate-angular-es6-webpack2

To install dependencies run: npm i

To run the project use:

npm start

To install test dependencies:

Use npm to install Protractor globally with: npm install -g protractor Update webdriver-manage(is a helper tool to easily get an instance of a Selenium Server): webdriver-manager update Now start up a server with: webdriver-manager start

To run test:

cd e2e-tests && protractor protractor.conf.js

Pattern used in boilerplate

Controllers & Services

Controllers and Services are write in ES6, example:

Controller

import './home.view.html'; // Import view template in the controller making a complete component

export class HomeController { // Export Controller to use in app.js and router.js
    constructor($http, $scope) {
        'ngInject' // Dependencies injection

        this._$http = $http
        this._$scope = $scope
    }

}

Service

export class UserService { // Export Service to use in app.js or Controllers
    constructor($http) {
        'ngInject' // Dependencies injection

        this._$http = $http
    }

    getUser(id) {
       return this._$http.get(`/users?id=${id}` )
   }

}

Directives

Directives are a little more complicated because the Angular needs an literal object, different from the controller and service that create constructor function

export class ExampleDirective { // Export Directive to use in app.js
  constructor () {
    'ngInject' // Dependencies injection

    this.templateUrl = 'directives/exampleDirective/example.view.html'
    this.restrict = 'E'
    this.controllerAs = 'ctrl'
    this.scope = {
      title: '@'
    }

    this.setTitle()
  }

  // optional compile function
  compile (tElement) {
    tElement.css('position', 'relative')
  }

  // optional link function
  link (scope, element) {
    this.$interval(() => this.move(element), 1000)
  }

  // example method
  setTitle (title) {
    this.title = title
  }

  // example method
  move (element) {
    element.css('left', (Math.random() * 500) + 'px')
    element.css('top', (Math.random() * 500) + 'px')
  }

}

Docker Support

You can use it in development or production. There are 2 different docker-compose.yml files for each environment. When running point to the desired file and have fun.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].