marcwan / angularlivelessons Goto Github PK
View Code? Open in Web Editor NEWLiveLessons for Angular (6+). If you are looking for AngularJS, go to AngularJSLiveLessons
LiveLessons for Angular (6+). If you are looking for AngularJS, go to AngularJSLiveLessons
Can you add also TypeScript examples on your AngularLiveLessons ?
I am enjoying a well presented video introduction to Angular. I'm completely new to Angular.
I am using Safaribooksonline.com video 20, 'Create a model for your recipe app'
The editor (in the video) contains a model folder which has recipe.ts
This is not present in my editor.
Is this due a different version of Angular?
How does the model folder get created?
=============================
My machine details:
Angular 5
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.5.4",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
I kind of liked having a default photo if none was added to a recipe, but still want to use the class binding that contains the img tag. I see that *ngIf can handle an if...else, but I cannot seem to get it to work. I tried:
and also:
but keep getting this error:
Error: src/app/components/recipe-summary/recipe-summary.component.html:4:41 - error NG5002: Parser Error: Unexpected token / at column 50 in [recipe.cover_photo; then recipe.cover_photo else /assets/emptybowl.jpg] in D:/Documents/Learning/Web/Angular/recipes/src/app/components/recipe-summary/recipe-summary.component.html@3:40
4 <div class='cover-photo-holder' *ngIf="recipe.cover_photo; then recipe.cover_photo else /assets/emptybowl.jpg">
Error:
EditNewRecipeComponent.html:31 ERROR Error: There is no FormControl instance attached to form control element with name: 'ingredient_0
how to create this error:
click add ingredients button.
click add ingredients button.
click remove the first ingredients button.
fill in the ingredients forms
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.