@sensenet/controls-aurelia
v3.1.0
Published
Aurelia controls for sensenet ECM
Downloads
12
Readme
sn-controls-aurelia
This package contains a collection of UI components and controls for sensenet, written in Aurelia Framewok
Usage and installation
You can install the latest version from NPM
npm install --save @sensenet/controls-aurelia
You can import into your Aurelia application's entry point
import { Repository } from '@sensenet/client-core';
// ... your other imports
export async function configure(aurelia: Aurelia) {
aurelia.use
.standardConfiguration()
.developmentLogging()
// ... your other features and plugins
.plugin(PLATFORM.moduleName('aurelia-validation'))
.plugin(PLATFORM.moduleName('sn-controls-aurelia'));
aurelia.container.registerSingleton(Repository, () => {
const repo = new Repository(
{
repositoryUrl: 'https://my-sn7-instance',
});
return repo;
});
await aurelia.start();
await aurelia.setRoot(PLATFORM.moduleName('app'));
}
If you are using Webpack, add these dependencies into your webpack.config's plugins section:
new ModuleDependenciesPlugin({
"sn-controls-aurelia": [
'./attributes/ContentDragCustomAttribute',
'./attributes/ContentDropCustomAttribute',
'./attributes/SettingsValidationCustomAttribute'
]
}),
Please also add these into your HTML template's <head>
section:
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
</head>