This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"definitions": { | |
"nameMixin": { | |
"type": "object", | |
"properties": { | |
"nameFirst": {"type": "string"}, | |
"nameLast": {"type": "string"} | |
}, | |
"required": ["nameFirst", "nameLast"] | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
For this schema, each object's relationships are defined as an object under | |
a "links" property. | |
Each property of that object is the name of the relationship, and the value | |
is a single object with the "type" and "id" of the related object. | |
For "to-many" relationships, the value can be an array of the same objects. | |
*/ | |
var data = { | |
"articles": [{ | |
"id": "article1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"articles": [{ | |
"id": "article1", | |
"links": { | |
"author": {"type": "people", "id": "person1"} | |
} | |
}], | |
"people": [{ | |
"id": "person1", | |
"phoneNumber": "1234" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'angular'; | |
import 'angular-route'; | |
import 'angular-mocks'; | |
import './view1'; | |
describe('myApp.view1 module', function() { | |
beforeEach(angular.mock.module('myApp.view1')); | |
describe('view1 controller', function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add 'karma-systemjs' to the list of plugins | |
plugins: ['karma-systemjs', ...], | |
// Add 'systemjs' to the list of frameworks | |
frameworks: ['systemjs', 'jasmine'], | |
// Move all the `files` to `systemjs.files` | |
files: [], | |
systemjs: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="bower_components/traceur-runtime/traceur-runtime.min.js"></script> | |
<script src="bundle.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = require('systemjs-builder'), | |
path = require('path'); | |
// load SystemJS config from file | |
builder.loadConfig('./app/system.config.js') | |
.then(function() { | |
// Change baseURL to match the file system | |
builder.config({ baseURL: path.resolve('./app') }); | |
// Build a self-executing bundle (ie. Has SystemJS built in and auto-imports the 'app' module) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
import 'angular'; | |
import 'angular-route'; | |
import './components/version/version'; | |
import './components/version/interpolate-filter'; | |
import './components/version/version-directive'; | |
import './view1/view1'; | |
import './view2/view2'; | |
// Declare app level module which depends on views, and components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="bower_components/html5-boilerplate/js/vendor/modernizr-2.6.2.min.js"></script> | |
<script src="bower_components/traceur/traceur.js"></script> | |
<script src="bower_components/es6-module-loader/dist/es6-module-loader.js"></script> | |
<script src="bower_components/system.js/dist/system.js"></script> | |
<script src="system.config.js"></script> | |
<script> | |
System.import('app').then(function() { | |
angular.bootstrap(document, ['myApp']); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Configure module loader | |
System.config({ | |
baseURL: '/app/', | |
// Set paths for third-party libraries as modules | |
paths: { | |
'angular': 'bower_components/angular/angular.js', | |
'angular-route': 'bower_components/angular-route/angular-route.js' | |
} | |
}); |