+3 votes
by (100 points)

I have the following:

<div>{{ modal.data.text }}</div>

How can I hide the data that shows from view. I don't want it to have any height / width but some other reasons I want it to be added to the DOM.

Note the {{ are from AngularJS and it will substitute the {{ }} for some text when the page displays.

7 Answers

+21 votes
by (100 points)

A more Angular-y way:

<div ng-hide="modal.data.text" ng-bind="modal.data.text"></div>

Explanation: The div will hide when modal.data.text evaluates to true (contains some text in your case), and will also bind the value of modal.data.text to the inner HTML of the div.

+16 votes
by (100 points)

Like this:

<div style="display: none">{{ modal.data.text }}</div>
+14 votes
by (100 points)
#mydiv {

<div id="mydiv">{{ modal.data.text }}</div>
+10 votes
by (100 points)

Yes, that's your problem. Sage is basically Python when it comes to syntax (some extra goodies). In Python, the syntax is space and indentation. You only indent after colons (for things like loops, conditionals, definitions). Some good places to start learning basic Python are

+6 votes
by (100 points)

try this

    public static class ViewHolder extends RecyclerView.ViewHolder{

        private TextInputLayout textInputLayout;
        private EditText editText;

        public ViewHolder(View itemView) {
            editText.addTextChangedListener(new TextWatcher() {
                public void beforeTextChanged(CharSequence s, int start, int count, int after) {


                public void onTextChanged(CharSequence s, int start, int before, int count) {


                public void afterTextChanged(Editable s) {



        private void colocarModelo(Model model){

+6 votes
by (100 points)

Swift 3:

class MYPTempController: UIViewController {

    override func viewDidLoad() {

        let btn = UIButton(frame: CGRect(x: 0, y: 0, width: 100, height: 100))
        btn.addTarget(self, action: #selector(MYPTempController.btnClick), for: .touchUpInside)
    @objc fileprivate func btnClick() {

btn.addTarget(self, action: #selector(MYPTempController.btnClick(_:)), for: .touchUpInside)
func btnClick(_ sender: UIButton) {
+4 votes
by (100 points)

The regex to match a = nt then a number is:


And in your example:

line = .Falies/367. 11DG1550/11DG15537.Axiom=nt60 
line = .Failies/367. 11DG1550/11DG15537.Axiom=nt50 

it will return two matches:

1.  [49-53] `nt60`
1.  [105-109] `nt50`


`=` matches the character `=` literally 
1st Capturing group `(nt\d+)`
   `nt` matches the characters `nt` literally (case sensitive)  
   `\d` match a digit `[0-9]`  
   `+` Quantifier: Between one and unlimited times, as many times as possible,  
       giving back as needed  

if you want your regex to match a = word number then just replace the nt with \w+ to match any word.

hope this helps.

No related questions found