You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.
Hi.
Am new to angular and stuff.
Found this thing in search for a way to compile angular app for production in to a single file.
Hoped to use require.js optimize http://requirejs.org/docs/optimization.html
From first try it did not work that well. I did install bower and dependencies trough it.
Then installed require.js globally.
Then created build.js file for optimizer
From first look in to the file it seems to be fine, found dependencies and compiled everything together but it does not work.
For example that's how it defined angular dependency.
define("angular", function(){});
As a result in
define('services',['angular'], function (angular) {
angular.module('myApp.services', [])
.value('version', '0.1');
});
angular is undefined.
Can may be someone point me to what I am doing wrong or if there is better way to have nicely separated angular.js files compiled for production?
The text was updated successfully, but these errors were encountered:
I realize this is 6mo old but... just wanted to state for posterity sake that since Angular does not follow any standard module definitions, you have to use RequireJS Shims to use Angular as describe in the configuration for this project... Just have to look at https://github.com/tnajdek/angular-requirejs-seed/blob/master/app/js/main.js for the example config.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi.
Am new to angular and stuff.
Found this thing in search for a way to compile angular app for production in to a single file.
Hoped to use require.js optimize http://requirejs.org/docs/optimization.html
From first try it did not work that well. I did install bower and dependencies trough it.
Then installed require.js globally.
Then created build.js file for optimizer
And changed require.js data-main to point to it.
From first look in to the file it seems to be fine, found dependencies and compiled everything together but it does not work.
For example that's how it defined angular dependency.
As a result in
angular is undefined.
Can may be someone point me to what I am doing wrong or if there is better way to have nicely separated angular.js files compiled for production?
The text was updated successfully, but these errors were encountered: