2.4.2 • Published 1 year ago

materia-server-client-assets v2.4.2

Weekly downloads
93
License
AGPL-3.0
Repository
github
Last release
1 year ago

Materia Client Assets

This repository contains all the javascript and css needed for the Materia Server and some assets needed for the Materia Widget Development Kit.

Visit the Materia Documentation for more information.

Conventions and Guidelines

Angular

  • Each module is in it's own file, in a directory matching the type of module it is
  • use dashes to seperate words in file names
  • tests use the same name of the module they are testing (module.js and module.test.js)
  • file names start with the type of module it is: filter-, dir-, ctrl-, srv-
  • reusable code that has a wider scope then a single module is placed in a service module

Order of Code Angular Controllers

By convention, all controllers are written in a certain order from top to bottom:

  1. Variables and constants used in the controller
  2. Function defenitions, do define directly on $scope
  3. Expose variables and methods to $scope
  4. Initialize state
const app = angular.module('materia')
app.controller('peopleController', function($scope) {
	// define vars and consts
	let _people = []

	// define functions
	const _sortNames = (a, b) => `${a.first} ${a.last}`.localeCompare(`${b.first} ${b.last}`)

	const getPeople () => {
		// load users from some place
		_people.sort(_sortNames)
		$scope.people = _people
	}

	// Expose on scope
	$scope.people = []
	$scope.getPeople = getPeople

	// initialize
	getPeople()
})
2.4.1

1 year ago

2.4.2

1 year ago

2.4.1-alpha1

1 year ago

2.4.0

2 years ago

2.4.0-alpha2

2 years ago

2.4.0-alpha3

2 years ago

2.4.0-alpha1

2 years ago

2.3.0

3 years ago

2.3.0-alpha1

4 years ago

2.2.0

4 years ago

2.2.0-alpha5

4 years ago

2.0.0-alpha4

4 years ago

2.2.0-alpha4

4 years ago

2.2.0-alpha2

4 years ago

2.2.0-alpha1

4 years ago

2.1.1

5 years ago

2.1.1-alpha1

5 years ago

2.1.0

5 years ago

2.1.0-alpha3

5 years ago

2.1.0-alpha2

5 years ago

2.1.0-alpha1

5 years ago

2.0.0

5 years ago

2.0.0-rc1

5 years ago

2.0.0-alpha1

5 years ago

1.3.0-alpha3

5 years ago

1.3.0-alpha2

5 years ago

1.3.0-alpha1

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

1.0.0-alpha3

6 years ago

1.0.0-alpha2

6 years ago

1.0.0-alpha1

6 years ago

0.3.5

6 years ago