elsom25 / angular-requirejs-html5boilerplate-seed Goto Github PK
View Code? Open in Web Editor NEWA seed project combining AngularJs as the app engine, RequireJs for modular parts, Html5boilerplate for good practices, with Sass to make css fun!
A seed project combining AngularJs as the app engine, RequireJs for modular parts, Html5boilerplate for good practices, with Sass to make css fun!
I'm having trouble getting a custom directive going, does anyone have an exmaple that I can look at? Here's my simple test directive, basically should just dump an div that has the text "this is a chart" in it. How do I include this in directives.js? I'm getting an error like: "Error: Unknown provider: testProvider <- test <- testDirective"
I'm going for something like this plunker:
http://plnkr.co/edit/n7SZpyeQ9nbjVSYA7ibB?p=preview
define(['Console'], function (Console) {
'use strict';
var directive = ['test', function() {
return {
template: '<div></div>',
restrict: 'E',
link: function postLink(scope, element, attrs) {
element.text('this is a chart');
}
};
}];
return directive;
});
The new one uses shim instead of the order plugin, could this be updated to reflect the change?
Hi, I haven't idea, is it a good place to ask, but I can't find solution in google, so will ask here.
Is requirejs + angular still good solution?
I want to use they together, but for production imho the best solution is to use r.js optimizer and single js file. So what's benefits of using angularjs with requirejs together today?
Thanks in advance.
Vladimir
I have problems defining a custom filter, now I have a StartFromFilter.js
:
define(['Console'], function (Console) {
"use strict";
Console.group("Entering StartFromFilter module.");
var filter = function(input, start) {
start = +start; //parse to int
return input.slice(start);
}
Console.groupEnd();
return filter;
});
and my filters.js
define([
// Standard Libs
'Console' // lib/console/console
, 'Underscore' // lib/underscore/underscore
// Application Filters
, 'filters/StartFromFilter'
], function (Console, _, startFrom){
"use strict";
Console.group("Entering Filters module.");
var filters = {
startFrom: startFrom
};
Console.info("Registered filters: ", filters);
var initialize = function (angModule) {
_.each(filters,function(filter,name){
angModule.filter(name,filter);
})
Console.debug("Custom filters initialized.");
}
Console.groupEnd();
return {
initialize: initialize
};
});
But I get: Unknown provider: inputProvider <- input <- startFromFilter
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.