Posts

Showing posts with the label Angulajs

cannot find module angular http

npm install @angular/http@latest

How to use switch case in angular view

      <div ng-switch =" varible_name ">           <div ng-switch-when ="value1"><p>{{ value1}}</p></div>           <div ng-switch-when ="value2"><p>{{ value2 }}</p></div>           <div ng-switch-when ="value3"><p>{{ value3 }}</p></div>           <div ng-switch-when ="value4"><p>{{ value4}}</p></div>           <div ng-switch-default >...</div>       </div>

Download pdf by ajax or javascript or angular js

Click on button for generate pdf  $("#print_selected_label").on("click", function(){    data = []    $("input:checkbox.print_label:checked").each(function(){      data.push($(this).attr("id"));    });   //getting all information of checked checkbox    if(data.length > 0){    // if data is not null       In angular js controller         // var redirect_new = "/admin/v2/orders/print_multiple_label.pdf?" + jQuery.param(data);        // var pdf = window.open(redirect_new, 'Map PDF', '');      By Creating a link by javascript       // var mydiv = document.getElementById("download_pdf");      // var aTag = document.createElement('a');      // var link = " admin/v2/orders/print_multiple_label.pdf?id="+data ;      // aTag.setAttribute('href',link);      // aTag.innerHTML = "link text";      // mydiv.appendChild(aTag);      // aTag.click(); By making http request    

Searching on Select Box and Check Box || List

Searching on Select Box and Check Box Searching on List <input type="text" id="myInput" onkeyup="filterFunction()" placeholder="Search.." > <ul id="myulli">   <li><a href="#">abc</a></li>   <li><a href="#">xyz</a></li>  <li><a href="#">demo</a></li> <li><a href="#">testing</a></li> </ul> <script> function filterFunction(){    var input, filter, ul, li, a, i;    input = document.getElementById("myInput");    filter = input.value.toUpperCase();    div = document.getElementById("myulli");    a = div.getElementsByTagName("li");    console.log(a);    for (i = 0; i < a.length; i++) {        if (a[i].innerHTML.toUpperCase().indexOf(filter) > -1) {            a[i].style.display = "";        }

What is sql in Deep(Structured query language). Sql Tutorial -1

What is sql in Deep(Structured query language) Oracle was the first company to release a product that used the English-based Structured Query Language, or SQL. This language allows end users to extract information themselves, without using a systems group for every little report. Oracle’s query language has structure, just as English or any other language has structure. It has rules of grammar and syntax, but they are basically the normal rules of careful English speech and can be readily understood. What is SQL QUERIES It is known as data base language. It is used to communicate with any database. We can use this language constructs to write SQL QUERIES. What is SQL* PLUS SQL * PLUS is a default client tool and acts as an interface between client and database. What is SQL It is a collection of pre defined commands and constructs with syntactical rules

you should install 'babel-loader@7'. || babel version

If you are Getting any error in compiling main.js or app.js or in Entry file of React App You have to Update Babel versions and dependency npm install -D babel-loader @babel/core @babel/preset-env webpack And change config file options: {           presets: ['@babel/preset-env']         }

how to run rails console on other port

Open Console or Terminal When we do rails s  it will run by default on 3000 port number if you want to run on specific port then rails s -p <port-number> Hit local host on by remote address  Go to browser            And type in the url bar or search bar - 127.0.0.1:3000            If your address is like this localhost:3000 Here 3000 is a port number if you are running localhost on another port then remote address will be 127.0.0.1:<your current port number>

How do I pass an AngularJS variable into an HTML tag?

How do I pass an AngularJS variable into an HTML tag? There are three two option to pass angular variable into html. One is pass that variable into ng-modal. ex-<input type=”text” ng-modal=”angular_variable”>            2. Is pass that variable using one way binding. ex- html_tage {{angular_variable}} close_html_tag    <p>{{ name }}</p>

Angular js hidden form validation work

Angular Js  form validation   1-Create a Form                   <form name="userForm" novalidate > 2-Add Bootstrap Class for Showing Error Messages to that Div              <div class="form-group"  ng-class="  {'has-error':! userForm.email.$valid &&(!userForm.$pristine || userForm.$submitted),  'has-success':userForm.email.$valid && (!userForm.$pristine || userForm.$submitted)       }       "> replace userForm with your form name. 3-Now Add the input field into your form                 <input type="email"  name="email"  class="form-control"  ng-model="main.email"                            ng-minlength="5"  ng-maxlength="20"  required="required"> here we are adding required  validation. minimum length 5 validation . maximum length 20 validation. 4-Now Finally we add validation one by one 1-when fo

AngularJs form validation in deep

AngularJs form validation || client side validation by angular js 1-Create a Form                   <form name="userForm" novalidate > 2-Add Bootstrap Class for Showing Error Messages to that Div              <div class="form-group"  ng-class="  {'has-error':! userForm.email.$valid &&(!userForm.$pristine || userForm.$submitted),  'has-success':userForm.email.$valid && (!userForm.$pristine || userForm.$submitted)       }       "> replace userForm with your form name. 3-Now Add the input field into your form                 <input type="email"  name="email"  class="form-control"  ng-model="main.email"                            ng-minlength="5"  ng-maxlength="20"  required="required"> here we are adding required  validation. minimum length 5 validation . maximum length 20 validation. 4-Now Finally we