chandermani / angularjsbyexample Goto Github PK
View Code? Open in Web Editor NEWSource code repository for AngularJS By Example book.
Source code repository for AngularJS By Example book.
the codebase of trainer app after checkpoint 2.4 is not working please anyone check that it gives various types of errors in every checkpoint like
1.Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. in checkpoint(2.6)
2.angular.js:11413 Error: [$compile:tpload] Failed to load template: partials/start.html (in 2.6)
and so on
Not really sure why you're instructing anyone to use it if you're not using in the code yourself. Maybe it should be a one of or something.
Just an FYI for future readers, in Seeding the Database section in Chapter 5, in the seed.js instructions, make sure that you enable API access by clicking on the "Enable Data API Access" button and enabling access in the popup. This button can be found right under where you get the API key.
After struggling for a moment with $sceDelegateProvider error, i managed to get ride of it changing the url format for youtube :
$sceDelegateProvider.resourceUrlWhitelist([
// Allow same origin resource loads.
'self',
// Allow loading from our assets domain. Notice the difference between * and **.
'*://www.youtube.com/**'
]);
Because push is only defined for array. when I want to add a video for new exercise it doesnt work and doesnt add ng-form to view.
I corrected it in the model for Exercise Construc function as below:
if (!args.videos) {
this.related.videos=[];//we should specify type of videos as arrays!
}
But I am sure there is better way for this. Any suggestion?!
Thanks
Unfortunately when I try to edit an existing exercise it cant load that in exercise template page, but after I editing code such as it return the promise and resolving the promise in init() function solve my problem. I think the code here really needs modification:
var init = function () {
// We do not use the resolve property on the route to load exercise as we do it with workout.
$scope.exercise = ExerciseBuilderService.startBuilding($routeParams.id);
};
And Here:
service.startBuilding = function (name) {
//We are going to edit an existing exercise
if (name) {
buildingExercise = WorkoutService.Exercises.get({ id: name }, function (data) {
newExercise = false;
});
}
else {
buildingExercise = new Exercise({});
newExercise = true;
}
return buildingExercise;
};
we should consider using $promise
and using it after resolution at init()
function using then
call back Function
I dont see any console error but the images of the ng-src are not displaying.
Hello,
I am having an issue right out of the box with Karma. I have been receiving an error message regarding karma-ng-html2js-preprocessor. To be on the safe side, I have download the codebase and follow the instructions about karma, and bower. However, I am still receiving the error messages below, can you please advise?
`/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)
at error (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:22:12)
at Object.parent.get (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:9:13)
at get (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:54:19)
at /Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/server.js:143:20
at Array.forEach (native)
at Server._start (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/server.js:142:21)
at invoke (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/di/lib/injector.js:75:15)
at Server.start (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/server.js:103:18)
at Object.exports.run (/Users/Fabien/Documents/WebAngularJS/AngularJS by Example/7MinuteWorkout-Testing/trainer/node_modules/karma/lib/cli.js:280:26)
at requireCliAndRun (/usr/local/lib/node_modules/karma-cli/bin/karma:44:16)
at /usr/local/lib/node_modules/karma-cli/bin/karma:54:12
at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:45:21
at ondir (/usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:188:31)
at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:154:39
at onex (/usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:94:22)
at /usr/local/lib/node_modules/karma-cli/node_modules/resolve/lib/async.js:25:18
`
Hi there;
In the config file we include api-key which is a secure key. Is it normal?! what can we do that hide this in at least in developer tools for user?!
Thanks
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.