Last active
June 7, 2016 08:57
-
-
Save RobbertWolfs/4c03ff1a27b042d3fb1d97c1b86445d7 to your computer and use it in GitHub Desktop.
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 from 'angular'; | |
import component from './home.view.js'; // this includes the home.view.js file and creates an angular 1.5 component below | |
const module = angular.module('app.shell.modules.home', []); | |
module.component('shellHome', component); | |
export default module.name; |
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 './home.scss'; | |
class ShellHome { | |
/* @ngInject */ | |
constructor($scope) { | |
$scope.cars = [{ | |
id: 1, | |
name: 'Audi', | |
}, { | |
id: 2, | |
name: 'BMW', | |
}, { | |
id: 1, | |
name: 'Honda', | |
}]; | |
$scope.selectedCar = []; | |
} | |
} | |
export default { | |
template: ` | |
{{ selectedCar }} | |
<am-multiselect class="input-lg" multiple="true" | |
ms-selected ="There are {{selectedCar.length}} car(s) selected" | |
ng-model="selectedCar" ms-header="Select Some Cars" | |
options="c.id as c.name for c in cars" | |
change="selected()"> | |
</am-multiselect> | |
`, | |
controller: ShellHome, | |
}; |
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
// OUR ANGULAR SETUP | |
import angular from 'angular'; | |
import shell from './shell.js'; // it includes the shell.js file | |
import 'angular-multiselect/dist/multiselect-tpls'; // it includes the multiselect-tpls file | |
const module = angular.module('app', ['am.multiselect', shell]); |
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 from 'angular'; | |
import shellHome from './home/index.js'; // this includes the home index.js file | |
const module = angular.module('app.shell.modules', [ | |
shellHome | |
]); | |
export default module.name; |
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 from 'angular'; | |
import modules from './modules/index.js'; // this iclides the modules index.js file | |
const module = angular.module('app.shell', [ | |
modules, | |
]); | |
export default module.name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment