Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9071107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:50:04+00:00 2026-06-16T17:50:04+00:00

I have some very simple Angular code which looks like this… <div ng-repeat=message in

  • 0

I have some very simple Angular code which looks like this…

<div ng-repeat="message in data.messages" ng-class="'conversationCard-' + 
message.type"></div>

It works, but the resulting output looks like this….

<div ng-repeat="message in data.messages" ng-class="'conversationCard-' + 
message.type" class="ng-scope conversationCard-phone"></div>

The problem is that my class now starts with ng-scope which is breaking my css selector which looks like this..

[class^="conversationCard"]

Is there any way of getting angular to remove the ng-scope, or at the very least put it at te end of the class declarations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T17:50:05+00:00Added an answer on June 16, 2026 at 5:50 pm

    It shouldn’t matter if you wanted to access that class via css:

    div.conversationCard-phone{
        //css stuff
    }
    

    I’m not sure why you’re using the ability to specify attributes in your css for classes, the method I’ve described is the common way of doing it. Can you perhaps elaborate on why you’re using the attribute selector?

    Edit

    Change your html to

    <div ng-repeat="message in data.messages" ng-class="message.type" class="conversationCard"></div>
    

    So that processed it becomes

    <div ng-repeat="message in data.messages" ng-class="message.type" class="ng-scope conversationCard phone"></div>
    

    So in your css you can do

    div.conversationCard{
        //css stuff
    }
    

    And if you want to isolate the phone one:

    div.conversationCard.phone{
        //css stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some very simple javascript code that looks like this: var newWindow =
I have some very simple sample code like this: $.ajax({ url: 'demo2.htm', success: function(loadeddata){
I have some very simple sample code like this: $.ajax({ url: 'demo2.htm', success: function(loadeddata){
I have some very simple code which works perfect for what look I'm trying
I have some very simple code which just needs to play a sound with
I have some VERY simple code to return the title for a section header:
I have written very very simple console application which supports some command line options.
I know this might be very easy to some,, I have a simple string
I have some very simple xml and xslt documents, which render in IE8 in
I have some very simple code below that I can't get to validate on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.