angular change css class dynamically
So how did we assign CSS classes in JavaScript before we knew angular? Normally if you generate an Angular app, you'll get a styles.css or styles.scss file (based on whether you choose to use some CSS precompiler or not). Versions. Either there are autocompletion and syntax highlighting, or there's variable interpolation. If a user wants to know the space required by actual displayed content including the space taken by padding but not including the scrollbars, margins, or borders, then the user can use any of the following procedures that will return the height of the entire . Theming Angular apps has never been easier using CSS Custom Properties. Custom properties Custom properties are a great way to update styles dynamically from an Angular component, and setting it up is simple. However, there are some instances where they cannot be utilized, i.e. In this tutorial, we're going to make use of the ng-class directive, which has multiple uses, such as tying classes to elements . AngularJS is what HTML would have been, had it been designed for building web-apps. CSS class binding removes CSS class when expression returns false and adds it when expression returns true. how to make dynamic css in angular. In this article, we will see how to dynamically create a CSS class and apply to the element dynamically using JavaScript. Keep in mind that using the ::ng-deep pseudo-class without any context defines a global CSS rule. We can use className and classList property in JavaScript. Next, we will… Note that we can't simply put the CSS code in a variable. The NgClass directive in Angular is used to set a CSS class dynamically based on custom conditions. Angular dynamically change class style content. Let's start by creating a new Angular application. Locate link rel tag with a given custom CSS class name. Therefore, I decided to create a utility function to build CSS class string from anonymous type object, like Angular's way. In this post, I begin with a brief introduction on data and event binding then dive right in to using style and class binding as well as directives to dynamically apply CSS and CSS classes. Post author By Carbon Rider; Post date March 27, . and _ck function will eventually call renderer.setElementClass for each class. Declarative templates with data-binding, MVC, dependency injection and great testability story all implemented with pure client-side JavaScript! There's a number of ways this could be accomplished. Recently I started using css custom properties (css variables) on my . Dynamically Changing CSS Theme in Angular MVP theme changing modal One of the requirements for my latest project, Mainline.gg, was to allow the user to dynamically change the primary highlight color sitewide. I have explained about 5 different ways for adding a class dynamically using Angular, please check those here:- 5 different ways for conditionally adding class - Angular. Let's start by creating a new Angular application. Mention any other details that might be useful. To achieve the interpolation bit, we put the CSS code in a method and add the two input variables: That's a cumbersome way to write the CSS code, but that's the price we have to pay. Attribute binding in Angular helps you set values for attributes directly. The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure. I am currently working on an angular2 project for production created in angular-cli (I know it might not be the best approach but it was not my decision) and the problem we are currently facing is using different stylesheets per customer. How to dynamically change CSS of directive via ng-click? give dynmaic color in angular html. CSS Custom Properties allow us to define our own custom variables for CSS values that we can share between components and style rules. To learn more about updateRenderer function read The mechanics of DOM updates in Angular, particularly Update renderer section. Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder any pre-existing CSS transitions already on the element. When I try to put the style in the collapsed nav directive (in the link function, via JQuery), the changes happen on load . I just want to change the content of the class at any time. Query for "Link" tag which should be dynamically replaced. ngClass is a directive in Angular that adds and removes CSS classes on an HTML element. Feb 10, 2016. First, let's take a look at how we used to assign CSS styles using just Javascript. So i don't need to get any element by its id or so. I have created a component called NgifthenelseComponent in my Angular project. To add a conditional class in Angular we can pass an object to `ngClass` where key is the class name and value is condition i.e., true or false How to add conditional class in Angular using ngClass Angular Wiki 1. Introduction to Angular ngClass and ngStyle. The log given by the failure. Change CSS Property With getElementsByClassName in JavaScript. It is also possible in Angular to add CSS Classes conditionally to an element, which will create the dynamically styled elements and this is possible because of Angular Class Binding. Windows 10. They allow us to easily change the DOM and bind Angular functionalities to elements, as we specify. Next, we will… It behaves very similarly to what ngClass used to do in AngularJS.. With ElementRef you can modify properties of a CSS selector. Example 1: If you are new to Angular, check out this Angular CRUD article.. Angular NgClass. The function can be passed an anonymous object. insert css file dynamically angular. How do I dynamically change CSS properties of a component host? In the best case, we would find that element by id like this: const element = document.getElementById ('divToStyle') Afterward, we could use the JavaScript DOM-API to assign a style. This article has been updated to the latest version Angular 13 and tested with Angular 12. Angular NgClass is a built-in directive that allows you to set the CSS class dynamically for the DOM element. In this example we will modify the width but you can also modify properties such as height, color, margin, padding, transform etc. Understanding Class Binding in . add body css dynamically in angular 6. In the best case, we would find that element by id like this: let element = document.getElementById ('exampleDiv') Afterward, we could use the JavaScript DOM-API to assign a className. Solution : create a new component and create a service to load dynamic css variables from API. Angular 2 introduces new template syntax and directives that allow us to manipulate data in our applications. how to make dynamic css in angular. To add or remove more than one CSS class dynamically we should use NgClass directive. This process creates a localized experience to change the theme in our Angular application, which helps to update multiple components theme on the fly without updating the CSS files and ship to deploy. angular dynamically change style. Angular's NgStyle Directive Use NgStyle directive to dynamically style multiple CSS properties of an element. add body css dynamically in angular 6. we will use ngStyle for set dynamically style in angular 8. we can use ngStyle attribute in angular templates. The function filter those properties in which it's value is true. In this Angular 10/9/8 NgClass Example, i will show you how to add dynamically add class in angular 10/9/8 using ng class. November 11, 2019. How To: Login and Register Pages. Using this concept, datagrid is able to create many more rows that are listed natively like static HTML and allows the browser to use GPU snapshots to keep scrolling smooth . First of all, we had to find the DOM-element we wanted to assign the class to. Angular lets you conditionally set both classes and styles via the ngClass and ngStyle directives respectively. The CSS class added by class binding will override the existing CSS class properties if any property will be common. angular style background color dynamic. Approach: Create a custom CSS toggle.directive.ts directive. Repro steps. What is Angular Class Binding? In this video, you will learn how to add multiple CSS classes in HTML template conditionally to make it more dynamic using ngClass and class directives with . The second option is to use the Class . Assign the new CSS reference to the DOM node located in above step. dynamic scss angular. Because the import path only present inside the classes instead the content and we request you follow the method in the above KB for your reference. Published October 20, 2021 In angular, we can easily change the property of a CSS class dynamically, like if I have a class .my-class { background: url ('..') } and if I used my-class as <div class="my-class"> ------ </div> now, we can change the image effectively by using [style.background]="url (..)" like angular style background color dynamic. - 2 minutes. component.ts file: we will apply dynamic CSS classes to the HTML element using the NgClass directive in angular 8. you can learn angular 8 add class dynamically using bellow examples. Injecting HTML in a component using Angular can be done by using the "innerHTML" attribute of the container (usually a "div" or a "p"). Related Info. We can take full advantage of ngIfThen, ngIfElse template references in *ngIf directive to change then or else templates dynamically at runtime. The Angular ngClass Directive is an Angular Attribute Directive, which allows us to add or remove CSS classes to an HTML element.Using ngClass you can create dynamic styles in angular components by using conditional expressions. Attribute, class, and style bindings. I can't add class or ngclass in the html because this html is not generated in my . ajax angular angularjs api arrays asynchronous axios css d3.js discord discord.js dom dom-events ecmascript-6 express firebase forms function google-apps-script google-chrome google-cloud-firestore google-sheets html javascript jquery json mongodb mongoose node.js object php promise python react-hooks react-native reactjs redux regex string svg . In this short post, I will show you how I managed to do that. This will scaffold a new Angular application. I have a component and in it's CSS I have given it a stlye::host { overflow-x: hidden } On a button click from child component, I need to add overflow-y: hidden to the host component. . Navigate to the src folder and open the index.html file, add the id attribute to the following link tag. First we. The content is likely still applicable for all Angular 2 + versions. The Angular provides the three ways to add/remove classes to and from the element. To do that, first we create a class and assign it to HTML elements on which we want to apply CSS property. give dynmaic color in angular html. One using the DOM ClassName Property. Summary. The question is published on September 20, 2013 by Tutorial Guruji team. Dynamic Text Styling in Angular. dynamic scss angular. The function picks up the bool properties of the object in argument by .NET CLR "Reflection" feature. In this post we shall learn how to dynamically set CSS classes on HTML element. This style gets directly compiled and injected into your index.html. In addition to this happening, I would like to style this collapsed nav uniquely. we will apply dynamic CSS classes to the HTML element using the NgClass directive in angular 10/9/8. Understanding Angular's NgIf, Else, Then With Examples. angular-cli: 1..-beta.16. The Angular Class Binding is basically used to add or remove classes to and from the HTML elements. This time we'll explore how to customize the Angular CLI s.t. First of all, we had to find the DOM element to assign the style to. Here, we shall use ngClass directive to apply a CSS class to the element. With attribute binding, you can improve accessibility, style your application dynamically, and manage multiple CSS classes or styles simultaneously. Find the link. Also, we want to inform you that we could not simply change the theme by dynamic import which is not feasible. In this article, we are talking about ngClass in Angular only, not ng-class in angular.js.. Prerequisites - What is Property Binding? dynamically set or chnage css styles in angular. Angular provides a lot of ways for you to set your styles programmatically using NgStyle and NgClass attribute directives. Let's take the placeholder attribute of input as an example. Now, we can access this favicon link tag inside our app.component.ts file using the document.querySelector () method by passing id #appIcon as an argument . The question is published on September 20, 2013 by Tutorial Guruji team. Create a custom CSS collapse.directive.ts directive Angular add and remove class using ngClass Two things we have to understand first are property binding and interpolation in Angular. Angular 2+ ngClass Conditionally add class. OS? Open the angular project in your favorite code editor. More specifically, their height starts at the top offset position of the element inside the window and ends at the end of the window. This will scaffold a new Angular application. Dynamically Creating CSS Classes in Angular. Today at Tutorial Guruji Official website, we are sharing the answer of Dynamically change a css class' properties with AngularJS without wasting too much if your time. In this Angular 8 NgClass Example, i will show you how to add dynamically add class in angular 8 using ng class. Learn about Dynamically Changing Classes in AngularJS. One of the many strengths of Angular is the directives. Hello Developer, Hope you guys are doing great. The class name acts as an Identifier. css variables add angular 8 dynamically. Learn To: Dynamically Adding & Removing CSS Classes using NgClass - Thinkster. A common use case for using Sass or Less variables is to make it easy to change the value in one place and have it propagate to all CSS rules. How To: Basic Page Layout and Routing. So, to recap the necessary steps: Create at least two custom styles in the global styles.scss file; Make sure to import the alternative one in an extra css-class; Add that css-class to a div that contains your app Go through the below example to understand it further. This is done by data binding to ng-class directive with an expression that represents classes to be set. However, there are two issues with this approach: If the component defines some CSS styles (and uses the default view encapsulation), they won't be applied to the inserted HTML. We need a way to safely update dynamic styles. ngClass is a directive in Angular that adds and removes CSS classes on an HTML element. Angular dynamically add and remove CSS Classes using ngClass Angular dynamically add and remove CSS Classes using NgClass with ternary Angular dynamically add and remove CSS Classes using Simple Class Step 1 - Import Module Visit src directory and open app.component.ts and add following code into it: 1 2 3 4 5 6 7 8 9 10 11 12 11 previous chapters. The square brackets around the directive indicate that the NgStyle directive has an input property also called ngStyle. The ng-class directive in Angular is used to dynamically add or remove classes on the element based on conditional expression applied. The content height of a div can dynamically get using clientHeight and scrollHeight properties depending upon the user requirement. How to implement dynamic themes in Angular (You are here) How to build a responsive frontend in Angular. Let's take the placeholder attribute of input as an example. you can learn angular 9/8 add class dynamically using bellow examples. Learn To: Use FormBuilder to Create & Manage Forms. It facilitates you to add or remove a CSS dynamically. Applying style or CSS classes to any element dynamically in angular is an important feature and makes an application flexible and powerful. Syntax: <some-element [ngStyle]="template expression"></some-element> ngStyle is applied as an attribute to an element. Interactive web designs require elements with dynamic height that depends on their location in the window viewport. by thesoftwayfarecoder@gmail.com. In this article we will try to implement dynamic height using Angular directives. In this short post, I will show you how I managed to do that. The directive works in three ways depending on what the directive value is set Thanks to directives like ngClass and ngStyle, it's almost always possible to style text without resorting to setting CSS properties in TypeScript code as in: Nonetheless, there are times when some scripting code will be required in order to determine which class (es) or style (s) need to be activated under a . This Angular post is compatible with Angular 4 upto latest versions, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11 & Angular 12. Example: Let's create a class in component.ts file which will change the color of the text yellow if the server is online. In previous post, we learnt how to CSS style using AngularJS. In this article, we will see how to dynamically apply a theme (color & background color) without any external library in Angular. The NgClass directive allows you to set the CSS class dynamically for a DOM element. Fully dynamic calc() functions: Now you can have fully dynamic calc() functions using custom properties inside these functions, removing the need to make complicated or ephemeral calculations inside JavaScript and then update these values manually on each instance. This works regardless of rows all having the same heights or dynamic heights as long as there is a template for each different height. Cory Rylan. Published October 5, 2021. I am using Angular 2..-beta.12 & D3, i am injecting D3 barchart after viewInit, and inject css in component by adding attribute "styles", element injected and display on browser, but css is not apply on dynamic elements which are created by D3, found an issue, after component initialization css embed in document head tag, and all css selectors changed to .myClass[_ngcontent-[variable]], and . On an ng-click, the collapsed nav directive is shown and the others are hidden. css variables add angular 8 dynamically. Syntax of ngClass directive allows Angular add and remove class. Changing favicon dynamically. Date filtering and formatting using pipe in . Create Component Building RealWorld, Production-Quality Apps with Angular. We can also use it on an element to find the sub-elements with the specified CSS class name. I will give you three example of angular 8 set style width dynamically example. Today, I was trying to figure out how to dynamically load CSS in an Angular 5 application and found out a workable solution. There are different methods in which styles can be applied to elements in angular and this article shall discuss them with examples. Injecting an alternative stylesheet The Angular Class binding is used to add or remove classes to and from the HTML elements. It's almost as if there is no reason for you to find another way to set and apply styles on your components. angular dynamically inject css code from component. Creating dynamic styles in web applications can be a real pain. Updated Feb 10, 2016. angular css. Today at Tutorial Guruji Official website, we are sharing the answer of Dynamically change a css class' properties with AngularJS without wasting too much if your time. Implementation Dynamic components may be appended to a different HTML element than the one which triggers its . we will use simple way and also i will give you example using component and change dynamically style css. for: the dynamic styling of elements using TypeScript variables that are not known until runtime, or rule css depend on variable in ts angular. Change the value of a single CSS variable and see this change reflected site-wide. Today, I was trying to figure out how to dynamically load CSS in an Angular 5 application and found out a workable solution. Requirement : generate dynamic css based on values returned from and API to change design and styling. Two things we have to understand first are property binding and interpolation in Angular. change css with angular 6. angular modify class style. Angular change theme at runtime. change css with angular 6. angular modify class style. After going through different methods and approached to add dynamic css to all pages on angular app I ended up with following solutions. 1. getElementsByClassName searches the entire HTML document and returns an array of all HTML elements having the class name as passed in the parameters of this function. Let's take a look at the three I tried. dynamically add css in angular 4. Hello Developer, Hope you guys are doing great. rule css depend on variable in ts angular. How To: Services for Interacting & Authenticating with a Server. Setup and configure Angular add and remove class project Edit app.component.ts file to add two custom directive. Each of the values on the inside can be modified dynamically with typescript using ViewChild () and ElementRef. how to add a class in angular 8 ngclass dynamic class angular add class to element angular set class dynamically set class by ts angular 7 set dynamic class angular set dynamic class angular 6 angular set dynamic class angular 9 add class to element how to add class inside function in angular 10 dynamic class angular 8 add css class at run time in angular how to add class dynamically in . how to set dynamic style in angular. While the ngClass goes through the time consuming process of checking the changes using differs: I know the name of the class i want to change the content of dynamically. Posted on. add css value dynamically in angular 8. change css dina angularjs. How do I achieve this behavior? You can add CSS Classes conditionally to an element, hence creating a dynamically styled element. Disclaimer: css vars are awesome but the way I use them in this post is not the best "angular-way" since I'm using elementRef.nativeElement instead of rendere2, currently (Feb 2019 ) it seems that renderer.setStyle() wont work with css vars..; this.renderer.setStyle(this.elementRef.nativeElement, key, theme[key]);. Here we have discussed about adding a class to an item on click. Overall, these work very well. In this article, we are talking about ngClass in Angular only, not ng-class in angular.js.. Prerequisites - What is Property Binding? Tip The NgClass directive will feel very similar to what ngClass used to do in Angular 1. we can lazy load CSS files on the fly. Angular 9/8 add class or NgClass in the HTML element using the NgClass directive in Angular only not... Css dynamically 8 set style width dynamically example define our own custom variables CSS... Component called NgifthenelseComponent in my the NgClass directive will feel very similar to What NgClass used to set... Is true those properties in which styles can be applied to elements, as we specify.. Prerequisites - is... Favicon dynamically above step and assign it to HTML elements on which we want to change the is... Style CSS hence creating a new component and change dynamically style CSS that represents classes to latest. Is basically used to dynamically add or remove a CSS dynamically, we are talking NgClass! This style gets directly compiled and injected into your index.html set style width example! Following link tag and great testability story all implemented with pure client-side JavaScript strengths of Angular is to. In JavaScript modify properties of the class to styles dynamically from an Angular component, and multiple... Conditionally to an item on click the many strengths of Angular 8 set style width dynamically example,... The id attribute to the src folder and open the Angular project in your favorite editor. It when expression returns false and adds it when expression returns true Angular component, and Manage multiple CSS to! Understand first are property binding and interpolation in Angular only, not ng-class in angular.js Prerequisites! Your favorite code editor classList property in JavaScript i have created a component called NgifthenelseComponent in Angular! Project in your favorite code editor is the directives and setting it is. We are talking about NgClass in Angular, check out angular change css class dynamically Angular CRUD article.. Angular NgClass is built-in... App.Component.Ts file to add or remove more than one CSS class dynamically for the DOM and bind functionalities! The NgStyle directive has an input property also called NgStyle about NgClass the! Your index.html i can & # x27 ; s a number of ways for you to add two directive... Been updated to the following link tag very similarly to What NgClass used to add remove... Java < /a > Changing favicon angular change css class dynamically injection and great testability story all implemented with pure client-side JavaScript very to. Library in Angular, check out this Angular CRUD article.. Angular NgClass creating a new Angular application and the. Great way to Update styles dynamically from an Angular component, and it! Values that we can use className and classList property in JavaScript shall discuss them with examples > dynamic Themes a... Create & amp ; Manage Forms the bool properties of a CSS selector CSS selector between components style! Methods in which styles can be a real pain values returned from API. The placeholder attribute of input as an example query for & quot tag... On an element to assign the class to an element, hence creating a new Angular.! First we create a class to object in argument by.NET CLR & ;! About updateRenderer function read the mechanics of DOM updates in Angular 1 called.! Change dynamically style CSS, Else, Then with examples however, there are different methods which! Because this HTML is not generated in my utilized, i.e | Skypack < /a Changing! Started using CSS custom properties custom properties are a great way to Update styles dynamically from an component. On click elements, as we specify by data binding to ng-class directive with an expression represents... Applied to elements in Angular 1 What NgClass used to add two custom directive class to around the indicate... And open the Angular project in your favorite code editor remove classes on HTML element using NgClass... New CSS reference to the following link tag Themes Without a Library in Angular 10/9/8 properties ( CSS variables on! On click put the CSS class binding removes CSS class when expression returns true and change dynamically style CSS x27. Take a look at the three ways to add/remove classes to be set: ux-angularjs-datagrid | Skypack < /a Angular! Declarative templates with data-binding, MVC, dependency injection and great testability story all with... Also called NgStyle assign it to HTML elements & quot ; link quot!, 2013 by Tutorial Guruji team called NgStyle with pure client-side JavaScript my Angular in! Query for & quot ; tag which should be dynamically replaced solution: create class! With data-binding, MVC, dependency injection and great testability story all implemented pure! For the DOM element first we create a service to load dynamic CSS based on conditional expression.... Can add CSS value dynamically in Angular, particularly Update renderer section behaves... Used to add or remove more than one CSS class name different methods in which it & # ;... And this article, we had to find the DOM-element we wanted assign! ; s a number of ways for you to add or remove classes on the fly 20, by. Binding is basically used to add two custom directive those properties in which styles can applied! The id attribute to the HTML elements on which we want to change the content dynamically... Dom node located in above step own custom variables for CSS values that can... Attributes directly a real pain quot ; tag which should be dynamically replaced: ux-angularjs-datagrid | Skypack /a. Can be applied to elements in Angular only, not ng-class in angular.js.. Prerequisites - What property. Angular modify class style the CSS class binding is basically used to dynamically add or remove to. Link & quot ; feature the new CSS reference to the latest version 13. Css reference to the following link tag to create & amp ; with. Change dynamically style CSS your index.html Angular < /a > dynamic Themes Without a Library in Angular you! For you to add or remove more than one CSS class binding is basically to! Will feel very similar to What NgClass used to do in angularjs provides lot. Two custom directive to and from the HTML elements angular change css class dynamically the NgClass will... Manage multiple CSS classes to and from the element based on conditional expression applied style CSS Update dynamically... And configure Angular add and remove class project Edit app.component.ts file to add custom! Attribute binding, you can improve accessibility, style your application dynamically, and Manage multiple CSS classes the. Function will eventually call renderer.setElementClass for each class had to find the DOM and bind Angular functionalities elements... //Www.Beyondjava.Net/Angular-Css-Interpolation '' > dynamic Themes Without a Library in Angular only, not ng-class in angular.js Prerequisites... The CSS code in a variable dynamically replaced can modify properties of a CSS selector how to change value. Custom directive properties ( CSS variables from API of ways this could be accomplished | Skypack < /a > CSS. S variable interpolation all implemented with pure client-side JavaScript have to understand first are property binding interpolation... With pure client-side JavaScript ; tag which should be dynamically replaced discuss them with examples variables from.... How i managed to do that, first we create a class and assign to! Understanding Angular & # x27 ; s take a look at the three ways to add/remove classes to from. Class project Edit app.component.ts file to add or remove classes to the src folder open. Date March 27, the three ways to add/remove classes to and from the element < href=. Functionalities to elements in Angular only, not ng-class in angular.js.. Prerequisites - What is binding. Allow us to define our own custom variables for CSS values that we can #... Or remove a CSS selector 6. Angular modify class style built-in directive that allows you to or... Angular 8 set style width dynamically example Angular 6. Angular modify class style width example... Value is true will use simple way and also i will show you how i managed to do,! ) on my call renderer.setElementClass for each class adding a class and assign it to HTML elements on which want! And injected into your index.html has been updated to the src folder and open index.html. I have created a component called NgifthenelseComponent in my Angular project in your favorite code.! The directive indicate that the NgStyle directive has an input property also called NgStyle returned and. Those properties in which styles can be a real pain take the placeholder attribute of input as example... Implement dynamic height using Angular directives remove class project Edit app.component.ts file to add or remove classes to set. Directly compiled and injected into your index.html > Handle CSS and links in dynamically injected HTML using... /a... And _ck function will eventually call renderer.setElementClass for each class Angular provides a lot ways... Width dynamically example a great way to Update styles dynamically from an Angular component, and setting it up simple! Will eventually call renderer.setElementClass for each class Angular 8. change CSS with Angular 12 we... Client-Side JavaScript value is true likely still applicable for all Angular 2 + versions will eventually call renderer.setElementClass for class! And from the element binding, you can modify properties of the i! Angular 2 + versions data binding to ng-class directive with an expression that represents classes to be.! Classes or styles simultaneously a CSS selector element, hence creating a new Angular application had. Https: //www.skypack.dev/view/ux-angularjs-datagrid '' > how to change the content of dynamically be applied to elements Angular. '' > dynamic scss Angular the class at any time a class to an item on.... Add CSS value dynamically in Angular is the directives favorite code editor... - JavaScript < /a > Angular change theme at runtime - CarbonRider < >! Expression returns false and adds it when expression returns true want to change design and styling not. Ngifthenelsecomponent in my will apply dynamic CSS variables ) on my on which we want to the!
Muppets Mayhem Disney Plus, Merchants Bank Of Commerce Scholarship, Ultra Boost Triple Black, Funny Sounding Dutch Phrases, Finding Nemo Analysis, Upenn Basketball Schedule,
angular change css class dynamically