webpack instead of browserify
This commit is contained in:
1 parent
b600df4f77
commit
5614b84db5
16 files changed
+267
-250
No files matched your search
+1
-4
@@ -4,10 +4,7 @@
|
||||
|
||||
var deps = [
|
||||
require('./modules/schedule')
|
||||
]
|
||||
.map(function(m){
|
||||
return m.name;
|
||||
});
|
||||
].map(m => m.name);
|
||||
|
||||
var app = angular.module("hudozhka", deps.concat([
|
||||
"hudozhka.data",
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
* Created by tmshv on 05/11/14.
|
||||
*/
|
||||
|
||||
import menuItems from '../../models/menu';
|
||||
|
||||
module.exports = function (app) {
|
||||
app.factory("menu", function ($route, $rootScope) {
|
||||
function Menu() {
|
||||
this.items = require("../../models/menu.json");
|
||||
this.items = menuItems;
|
||||
this.current = null;
|
||||
}
|
||||
|
||||
@@ -14,17 +16,17 @@ module.exports = function (app) {
|
||||
return i.url === path;
|
||||
});
|
||||
|
||||
if(f.length) {
|
||||
if (f.length) {
|
||||
this.current = f[0];
|
||||
}
|
||||
};
|
||||
|
||||
var menu = new Menu();
|
||||
$rootScope.$on('$routeChangeSuccess', function (event, current) {
|
||||
try{
|
||||
try {
|
||||
var path = current['$$route'].originalPath;
|
||||
menu.activate(path);
|
||||
}catch(e){
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user