Last active
August 29, 2015 14:00
-
-
Save dervalp/11374735 to your computer and use it in GitHub Desktop.
Api test
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
//registering a Model in Grail | |
var grailed = require("grail"); | |
var app = grailed("MyApplication"); | |
app.config({ | |
initialise: function () { | |
/* Require all configs */ | |
require('./config/moldy.config'); | |
}, | |
eventsToWaitFor: [ | |
/* Core */ | |
'events.initialised', | |
'helpers.initialised', | |
'models.initialised', | |
'services.initialised', | |
/* Custom */ | |
'ngcontroller.initialised', | |
'ngroutes.initialised' | |
] | |
}); | |
app.engine( require("grailed-angular-engine") ); | |
//registering a Model in Grail | |
app.model( Moldy.extend('person', require('../../schemas/person.schema')) ); | |
//registering a Controller in Grail | |
app.controller( 'mainService', { | |
route: '/', | |
templateUrl: '/partials/main.html', | |
controller: require('./services/main.service.js') | |
} ); | |
app.init(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment