Git Product home page Git Product logo

angular2-course's Introduction

angular2-course

angular2-course's People

Contributors

mosh-hamedani avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular2-course's Issues

Auth0 router is not provided

as you know the mechanism by which , Auth0 is set up within angular app has been changed .
however by following those steps we we will face with an error and that is :
zone.js:654 Unhandled Promise rejection: No provider for Router! ; Zone: <root> ; Task: Promise.then ; Value: Error: No provider for Router! at injectionError (core.es5.js:1169) at noProviderError (core.es5.js:1207) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._throwOrNull (core.es5.js:2649) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._getByKeyDefault (core.es5.js:2688) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._getByKey (core.es5.js:2620) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.get (core.es5.js:2489) at resolveNgModuleDep (core.es5.js:9475) at NgModuleRef_.webpackJsonp.../../../core/@angular/core.es5.js.NgModuleRef_.get (core.es5.js:10557) at resolveDep (core.es5.js:11060) at createClass (core.es5.js:10913) Error: No provider for Router! at injectionError (http://localhost:4200/vendor.bundle.js:56447:90) at noProviderError (http://localhost:4200/vendor.bundle.js:56485:12) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._throwOrNull (http://localhost:4200/vendor.bundle.js:57927:19) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._getByKeyDefault (http://localhost:4200/vendor.bundle.js:57966:25) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_._getByKey (http://localhost:4200/vendor.bundle.js:57898:25) at ReflectiveInjector_.webpackJsonp.../../../core/@angular/core.es5.js.ReflectiveInjector_.get (http://localhost:4200/vendor.bundle.js:57767:21) at resolveNgModuleDep (http://localhost:4200/vendor.bundle.js:64753:25) at NgModuleRef_.webpackJsonp.../../../core/@angular/core.es5.js.NgModuleRef_.get (http://localhost:4200/vendor.bundle.js:65835:16) at resolveDep (http://localhost:4200/vendor.bundle.js:66338:45) at createClass (http://localhost:4200/vendor.bundle.js:66191:35)

what to do with this change ?

Error during evaluation of "click"

<i (click)="deleteUser(user)" class="glyphicon glyphicon-remove clickable">

while deleteUser i am getting this error . when i click on delete icon its throwing error --> Error during evaluation of "click"

plz help me to solve

Local workspace file ('angular.json') could not be found.

E:\Project>ng serve
Local workspace file ('angular.json') could not be found.
Error: Local workspace file ('angular.json') could not be found. at WorkspaceLoader._getProjectWorkspaceFilePath (C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\workspace-loader.js:37:19)
at WorkspaceLoader.loadWorkspace (C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\workspace-loader.js:24:21)
at ServeCommand._loadWorkspaceAndArchitect (C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:180:32)
at ServeCommand. (C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:47:25)
at Generator.next ()
at C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:7:71
at new Promise ()
at __awaiter (C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:3:12)
at ServeCommand.initialize (C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\architect-command.js:46:16)
at Object. (C:\Users\Bapi\AppData\Roaming\npm\node_modules@angular\cli\models\command-runner.js:87:23)

typings ERR! deprecated The "ambient" flag is deprecated. Please use "global" instead

typings install underscore --ambient
typings ERR! deprecated The "ambient" flag is deprecated. Please use "global" instead

then when i enter with global i got list of errors. -->
C:\Users\ayyappa.amara\Documents\typrscript\demo>typings install underscore --global
typings ERR! message Unable to find "underscore" ("npm") in the registry.
typings ERR! message However, we found "underscore" for 1 other source: "dt"
typings ERR! message You can install these using the "source" option.
typings ERR! message We could use your help adding these typings to the registry: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/npm/underscore/versions/latest responded with 404, expected it to equal 200
typings ERR!
typings ERR! cwd C:\Users\ayyappa.amara.EFFONETECH\Documents\typrscript\demo
typings ERR! system Windows_NT 10.0.10586
typings ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\ayyappa.amara.EFFONETECH\AppData\Roaming\npm\node_modules\typings\dist\bin.js" "install" "underscore" "--global"
typings ERR! node -v v4.5.0
typings ERR! typings -v 2.1.0
typings ERR!
typings ERR! If you need help, you may report this error at:
typings ERR! https://github.com/typings/typings/issues

please tell me the solution

Trying to get this stuff going..

Good afternoon!!

I'm a software engineer but my strength is C++ in Visual Studio and that kind of world.. Trying to "catch up" a bit and learn some of this and not having much luck. I'm running Windows 7 Pro..

So.. I started with the video and it says you need angular-seed.zip but didn't mention where to get it from. Searched and found this site along with angular2-course-master.zip. Well. As I continue, things are close but not matching up and then getting errors.

npm install may have worked.. But.. When I try the npm start things go off for sure.. Cannot find module 'underscore'. Then complaints about Windows_NT 6.1.7601 and then like 20 errors. Any suggestions?

Thanks,
KEn

Angular2 Final Project:Form validation messages not displaying

Hi,
I was implementing Final Model Driven forms.The form is getting validated properly. But Validation messages are not displaying which is inside a div with *ngIf Directive:

Name is required.
I tried cloning the final project and run on my system, But still I am unable to get the validation messages. Can anyone please guide me . i want to mention here that In Beta seed project I am still able to get the error messages.

Favorite Icon Exercise Issue

In the Favorite icon exercise, I've set up a method for the click method. However, Chrome throws an error stating that glyphicons do not have such a method called click. Could someone kindly let me know what's the cause?

`import {Component} from 'angular2/core';

@component({
selector: 'favorite',
template:
<i
class="glyphicon"
[class.glyphicon-star] = "isFavorite"
[class.glyphicon-star-empty] = "!isFavorite"
(click)="onClick()">

})

export class FavoriteComponent {
isFavorite: boolean = false;
onCLick(){
console.log("Clicked");
this.isFavorite = true;
}
}`

Console Error:
Error during evaluation of "click" TypeError: l_context.onClick is not a function

Attached is the console error window error and the code

image
image

Lecture 81: I get: [ts] 'Promise' only refers to a type, but is being used as a value here

Can't seem to resolve. I get the error even before continuing along in the lecture and adding in the setTimeout function.

Per a suggestion from someone elsewhere. I added to the tsconfig.json:
"compilerOptions": {
...
"types" : [ "core-js" ]
}

But I still get the error.

Using Visual Studio code: Version 1.10.1.
OS: Windows 10 Pro.

Here's the code:

import {Control} from 'angular2/common';

export class UsernameValidators 
{
    static shouldBeUnique(control: Control) 
    {
       return new Promise((resolve, reject) =>
       {            
          setTimeout(function()
          {
             if (control.value == "Dan")
                resolve({ shouldBeUnique: true });
             else
                resolve(null);
          }, 1000);
       });
   }
}

I get the below error

[email protected] start /Users/mkmani/udemy/angular2-course
tsc && concurrently "npm run tsc:w" "npm run lite"

app/posts/posts.component.ts(6,20): error TS2307: Cannot find module 'underscore'.

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.5.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! Exit status 2

Lecture 93 - Observables - I get an npm start error - Failed at the [email protected] start script 'concurrent "npm run tsc:w" "npm run lite" '. Tell the author that this fails on your system: concurrent "npm run tsc:w" "npm run lite"

I unzipped the file to my C drive at: C:\Seed\Demo.

I tried to unzip to another location but kept getting an error regarding the path is to long so I had to go right to the root of C with a shortened name to get that error to go away.

Anyway, I coded the app.component.ts as instructed and I am now trying to test the Observable.

NOTE: I can run the npm that I have been using all along to this point and It fires up no problem. Even after getting this Observalbe testing error, I run the npm once again that I have been using all along and it starts up fine.

I attempted to get the npm running from the command prompt.

  • Keyed: cd C:\Seed\Demo
    Hit enter.
  • Keyed: npm start
    Hit enter.

I get:

22 error [email protected] start: concurrent "npm run tsc:w" "npm run lite"
22 error Exit status 1
23 error Failed at the [email protected] start script 'concurrent "npm run tsc:w" "npm run lite" '.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the angular2-quickstart package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error concurrent "npm run tsc:w" "npm run lite"

Screen shot:

npm error

Here's my source code in app.component.ts:

import {Component} from 'angular2/core';
import {Observable} from 'rxjs/Rx';

@component({
selector: 'my-app',
template: <input id="search" type="text" class="form-control" placeholder="Search">
})
export class AppComponent
{
constructor()
{
var keyups = Observable.fromEvent($("#search"), "keyup");
keyups.subscribe(data => console.log(data));
}
}

Here's the file location:

file explorer

Upgrade the projec to Angular 2 RC1. "-" error

331127c

Hello above commit have a below error.

$ npm start

[email protected] start K:\XAMPP\htdocs\angular2\angular2-course
tsc && concurrently "npm run tsc:w" "npm run lite"

app/posts/posts.component.ts(54,39): error TS2304: Cannot find name ''.
app/posts/posts.component.ts(80,27): error TS2304: Cannot find name '
'.
app/posts/posts.component.ts(80,34): error TS2304: Cannot find name '_'.
app/users/users.component.ts(1,33): error TS2307: Cannot find module '@angular2/core'.
app/users/users.component.ts(2,26): error TS2307: Cannot find module '@angular2/router-deprecated'.
node_modules/angular2/src/facade/promise.d.ts(1,10): error TS2661: Cannot re-export name that is not defined in the module.

npm ERR! Windows_NT 6.1.7600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.11.4
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! K:\XAMPP\htdocs\angular2\angular2-course\npm-debug.log

basicValidators.ts

Anyone managed to get the validators in user-form.component.html to work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.