Where do I find all the Angular Material framework's classes? - angular-material

Angular Material's docs is very well looking and clear as well.
But there are several examples where some classes are used (e.g. md-colored in https://material.angularjs.org/#/api/material.components.button/directive/mdButton ).
Where do I find them?

I recommend you set up yr dependencies using bower.
Instructions here : https://github.com/angular/material#bower
And once you do so, inside yr bower_components folder you have everything. You can go and read documentation and you will find whole css and js as well.
bower_components/angular-material/angular-material.css

Related

Protractor: ng-binding what does the ng stand for

I'm using protractor and locators like ng-bind and I got curious.
What does the "ng" stand for?
I did a bit of hunting and didn't find the definition.
I don't know much about protractor, but this might be related to Angular which has "ng" in front of a lot its functions. For example: ngFor, *ngIf, and ngClass.
Also a lot of 3rd party angular libraries use ng to denote that they are angular libraries. For example ng-bootstrap, ng-quill, and ng-score-polygon.
Note that ng was typically used for angularjs, ng2 and ngx were typically used for angular 2 and newer. Now ng is typically used for angular2 because angularjs is in long time support and not maintained.
If this is not related to some angular testing tool within protractor, then I'm not sure what it could stand for.
ng is short for A'ng'ular. I know, that it's not a great abbreviation but it is what it is. Since you are using Protractor, you must have come across additional locators like model, repeater etc, these utilises ng-model, ng-repeat. All built in functions of Angular uses this prefix.
The prefix ng stands for "Angular;" all of the built-in directives that ship with Angular use that prefix. Similarly, it is recommended that you do not use the ng prefix on your own directives in order to avoid possible name collisions in future versions of Angular.
From the FAQ:
Why is this project called "AngularJS"? Why is the namespace called
"ng"?
Because HTML has Angular brackets and "ng" sounds like "Angular".

Vendor libs in ASP.NET MVC file structure

I'm the client-side guy at my job and for the web application we're building I am introducing some new JS libs besides the already residing jQuery and jQuery UI. We use the standard folder structure setup with CSS and images in ~/Content and JS in ~/Scripts. In the latter we have our internally developed libs categorized into subfolders such as ~/Scripts/Plugins.
However, now I want to add i.e. TinyMCE and find myself confused. NuGet installs all TinyMCE-related files to ~/Scripts/tinymce, but tinymce/skins holds CSS and images which I feel should not be contained in the ~/Scripts folder.
What is the proper way to structure vendor libs within the MVC file structure? Or, if there is no proper way, is there a proposed best practice? I don't feel like * up the original neat structure too much. Note that I am not looking for creating bundles, that lies in the future and the on-disk structure is a separate concern.

TypeScript in MVC

Im bulding a website using MVC4. Recently I've read about TypeScript. It looks really nice however I cannot find any use for it in a MVC website. Am I missing something? Do you use it? Where?
TypeScript is a pre-compiler for JavaScript. Hence you can use TypeScript only as a replacement for JavaScript (server-side, e.g. Node.js, or client-side, i.e. in the browser).
As you are probably writing MVC4 code with C#, TypeScript will be of no use for you in relation to MVC4.
Regarding the client-side it's somewhat different.
I guess the main point you need to know is that TypeScript is not (yet) just another language on the server, that you can exchange with C#.
I find it quite useful for building largish apps with lots of logic on the client. The interfaces help avoid some errors. It compiles to javascript so you could use it instead of javascript. If you're just writing a couple of lines I wouldn't bother though.
You can link to the generated javascript files from TS files directly in the script bundles or HTML. If you want to automatically link to many JS files, use require JS. This will save you having to link to many js files.

What is the use of jquery.mobile.structure-1.0.css in jquery mobile

I have a question. When i am creating an application in rhomobile jquery.mobile.structure-1.0.css present inside /public/jqmobile. My question
1) What is the use of jquery.mobile.structure-1.0.css
2) jquery.mobile.structure-1.0.css was not included anywhere (in layout.erb) the application. Then why jquery.mobile.structure-1.0.css is present. I try to find the use of jquery.mobile.structure-1.0.css but not getting good result. Any one can explain?
The structure CSS is used to make a completely custom theme, where you do not want to rely on any of the default themes that come with jQuery Mobile. It's a very basic bare bones stylesheet. You can use it in place of the main jQuery Mobile stylesheet, then you create your own stylesheet to override and customize.
Personally I seperate the structure css out so I can make changes to my themes without causing any major issues to the new theme.css architecture. Makes it a bit easier to make upgrades as new versions come out. Though it is a little tricky to verify that there are no new additions to the themes. I wouldn't use overrides on the base themes a,b,c,d, - I find it's better to build your own themes using those as bases, e,f,g, etc...

Why are there so many javascript files in my empty MVC 2 project?

When creating an empty MVC 2 project, I have a lot of javascript files in my Scripts folder. Why? Will removing them affect my application?
No removing them won't affect anything, unless they are being used in pages. However you said this is an empty MVC project so you'll be fine.
They're there for you to use, to make your life easier. For example, JQuery is included.
Take for example JQuery file, It provieds functions which has solutions for crossbrowser related issues which makes developement easy. Similarly other files has functions whcih are providing readymade functionalities which can be used for rapid developement.
Unfortunatly as JS is traveling to browsers its downloaded on the client. Its suprising for not JS people as its not like .NET api where one or more dll is sufficient for all the api and developer dont have to worry(some times :)) about from where they are coming.
I will suggest you to study included JS files and include/use only those which you really wanted to use.

Resources